Update publish-wiki.yml #24
This file contains 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: | |
- docs/** | |
- .github/workflows/publish-wiki.yml | |
concurrency: | |
group: publish-wiki | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
publish-wiki: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Check if docs folder was modified | |
id: check_docs | |
run: | | |
if [[ $(git diff --name-only HEAD^ HEAD) =~ ^docs/ ]]; then | |
echo "docs folder has changed." | |
echo "modified=true" >> $GITHUB_ENV | |
else | |
echo "docs folder has not changed." | |
echo "modified=false" >> $GITHUB_ENV | |
fi | |
- name: Publish to wiki | |
if: env.modified == 'true' | |
uses: Andrew-Chen-Wang/github-wiki-action@v4 | |
with: | |
path: docs/ |