HexCasting/.github/workflows/build_docs.yml

28 lines
814 B
YAML
Raw Normal View History

2022-05-21 17:56:52 +02:00
name: Build the Python doc-gen
on: [push]
jobs:
build_docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Generate file
2022-05-21 18:26:12 +02:00
run: doc/collate_data.py Common/src/main/resources hexcasting thehexbook index.html.uncommitted
2022-05-21 17:56:52 +02:00
- name: Check out gh-pages
uses: actions/checkout@v3
with:
clean: false
ref: gh-pages
- name: Overwrite file and commmit
run: |
mv index.html.uncommitted index.html
git config user.name "Documentation Generation Bot"
git config user.email "noreply@github.com"
git add index.html
git diff-index --quiet HEAD || git commit -m "Update docs at index.html from $GITHUB_HEAD_REF"
- name: Upload changes
run: git push