iseal-core/.github/workflows/pages.yml

44 lines
1.2 KiB
YAML

name: Pages
on:
push:
jobs:
parse:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Poetry
uses: abatilo/actions-poetry@v2.1.4
- name: Install Python dependencies
run: poetry install
- name: Generate Hugo content
run: |
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:
runs-on: ubuntu-latest
if: ${{ github.ref_name == 'main' }}
steps:
- uses: actions/checkout@v2
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site/docs
publish_branch: site