-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github action to update options listing on wiki (#489)
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Update wiki | ||
on: | ||
push: | ||
branches: [master] | ||
concurrency: | ||
group: update_wiki | ||
cancel-in-progress: true | ||
permissions: | ||
contents: write | ||
jobs: | ||
publish-wiki: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ${{github.repository}}.wiki | ||
path: wiki_repo | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: repo | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dominion-dividers | ||
run: | | ||
cd repo | ||
pip install -r requirements.txt | ||
pip install . | ||
- name: Generate Options Doc | ||
shell: bash | ||
run: | | ||
cd wiki_repo | ||
echo '```' > "Documentation-(Script-Options).md" | ||
dominion_dividers --help >> "Documentation-(Script-Options).md" | ||
echo '```' >> "Documentation-(Script-Options).md" | ||
- name: Commit files | ||
run: | | ||
cd wiki_repo | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add "Documentation-(Script-Options).md" | ||
git diff-index --quiet HEAD || git commit -m "Update script options on wiki" && git push |
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
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