Add GH Action to publish site #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate and publish site | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build and Push | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
pip install -U pip | |
pip install poetry | |
poetry install | |
env: | |
POETRY_VIRTUALENVS_CREATE: false | |
- name: Build the site | |
run: python kipper/main.py output standalone dev/kip_mentions.csv site_files/index.html | |
- name: Push to site branch | |
uses: seanmiddleditch/gha-publish-to-git@master | |
with: | |
branch: gh-pages | |
github_token: '${{ secrets.GITHUB_TOKEN }}' | |
github_pat: '${{ secrets.GH_PAT }}' | |
source_folder: site_files | |
if: success() && github.event == 'push' | |