Set up Github Pages autobuild

This commit is contained in:
Alwinfy 2022-05-21 11:56:52 -04:00
parent 90e65a5b80
commit dc3517f386
No known key found for this signature in database
GPG key ID: 2CCB99445F0C949E

27
.github/workflows/build_docs.yml vendored Normal file
View file

@ -0,0 +1,27 @@
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
run: doc/collate_data.py src/main/resources hexcasting thehexbook index.html.uncommitted
- 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