Skip to content

Commit 7014a98

Browse files
committed
TEST | GH Actions: add a workflow to automatically deploy the wiki
1 parent 889be18 commit 7014a98

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/publish-wiki.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish wiki
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
paths:
7+
- wiki/**
8+
- .github/workflows/publish-wiki.yml
9+
# Do a dry-run (check, no deploy) for PRs.
10+
pull_request:
11+
paths:
12+
- wiki/**
13+
- .github/workflows/publish-wiki.yml
14+
# Allow running this workflow manually from the Actions tab.
15+
workflow_dispatch:
16+
# Allow this workflow to be triggered from outside.
17+
repository_dispatch:
18+
types:
19+
- 'phpcs-release'
20+
21+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23+
concurrency:
24+
group: "publish-wiki"
25+
cancel-in-progress: false
26+
27+
permissions:
28+
contents: write
29+
30+
jobs:
31+
publish-wiki:
32+
name: "Publish Wiki"
33+
if: github.repository == 'PHPCSStandards/PHP_CodeSniffer-documentation'
34+
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout code
38+
uses: actions/checkout@v4
39+
40+
- name: Deploy to wiki
41+
uses: Andrew-Chen-Wang/github-wiki-action@v4
42+
with:
43+
strategy: 'clone'
44+
path: 'wiki/'
45+
# commit-message: ...
46+
# repository: PHPCSStandards/PHP_CodeSniffer
47+
# token: ${{ secrets.PHPCS_GITHUB_TOKEN }}
48+
# dry-run: ${{ github.event_name == 'pull_request' }}

0 commit comments

Comments
 (0)