TEST | GH Actions: add a workflow to automatically deploy the wiki #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish wiki | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- wiki/** | |
- .github/workflows/publish-wiki.yml | |
# Do a dry-run (check, no deploy) for PRs. | |
pull_request: | |
# Allow running this workflow manually from the Actions tab. | |
workflow_dispatch: | |
# Allow this workflow to be triggered from outside. | |
repository_dispatch: | |
types: | |
- 'phpcs-release' | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "publish-wiki" | |
cancel-in-progress: false | |
permissions: | |
contents: write | |
jobs: | |
publish-wiki: | |
name: "Publish Wiki" | |
if: github.repository == 'PHPCSStandards/PHP_CodeSniffer-documentation' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Deploy to wiki | |
uses: Andrew-Chen-Wang/github-wiki-action@v4 | |
with: | |
strategy: 'clone' | |
path: 'wiki/' | |
# commit-message: ... | |
# repository: PHPCSStandards/PHP_CodeSniffer | |
# token: ${{ secrets.PHPCS_GITHUB_TOKEN }} | |
# dry-run: ${{ github.event_name == 'pull_request' }} |