From dc3517f386cf547980535b7eed3bb68909e9e234 Mon Sep 17 00:00:00 2001 From: Alwinfy <20421383+Alwinfy@users.noreply.github.com> Date: Sat, 21 May 2022 11:56:52 -0400 Subject: [PATCH] Set up Github Pages autobuild --- .github/workflows/build_docs.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/build_docs.yml diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml new file mode 100644 index 00000000..2237d9f9 --- /dev/null +++ b/.github/workflows/build_docs.yml @@ -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