.github/workflows/pages.yml: attempt to update site

If there are changes to the site after running the schema parsing
script we should commit the changes.
This commit is contained in:
Alan Orth 2021-12-14 14:46:16 +02:00
parent ef580dfd86
commit d6d9767e2d
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -20,6 +20,16 @@ jobs:
- name: Generate Hugo content - name: Generate Hugo content
run: | run: |
poetry run ./util/generate-hugo-content.py -i ./data/schema-fields.csv --clean -d poetry run ./util/generate-hugo-content.py -i ./data/schema-fields.csv --clean -d
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
- name: Build Hugo site
run: hugo
working-directory: site
- name: Commit Hugo content
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Automated commit with site updates
file_pattern: site/*
pages: pages:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.ref_name == 'main' }} if: ${{ github.ref_name == 'main' }}