Push documentation in /docs/wiki to GitHub wiki #3
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: "Push documentation in /docs/wiki to GitHub wiki" | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "docs/**" | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Push docs to wiki | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | |
run: |- | |
gh auth setup-git | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git clone https://github.com/pavithraes/flowerpot.wiki.git | |
rm ./flowerpot.wiki/* | |
cp -r ./docs/* ./flowerpot.wiki/ | |
cd flowerpot.wiki | |
git add -A | |
git commit -m "Auto-update from /docs/wiki" | |
git push --set-upstream origin |