Skip to content

Commit

Permalink
Update publish-wiki.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
khuonghoanghuy authored Nov 24, 2024
1 parent e2ac0bf commit e5d0b2b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/publish-wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,22 @@ permissions:
jobs:
publish-wiki:
runs-on: ubuntu-latest
if: github.event.head_commit.modified | contains('docs/')
steps:
- uses: actions/checkout@v3
- uses: Andrew-Chen-Wang/github-wiki-action@v4

- 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/

0 comments on commit e5d0b2b

Please sign in to comment.