Generate and publish site #53
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 | |
schedule: | |
- cron: "30 9 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build Site Source | |
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: Download and process KIP data | |
run: python kipper/main.py init --days 365 | |
- name: Build the site | |
run: python kipper/main.py output standalone dev/kip_mentions.csv site_files/index.html | |
- name: Upload static files as artifact | |
id: deployment | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: site_files | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |