Generate and publish site #238
This file contains hidden or 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 ipper/main.py kafka init --days 365 | |
- name: Download and process FLIP data | |
run: python ipper/main.py flink wiki download | |
- name: Copy static page to site_files | |
run: | | |
mkdir site_files | |
cp templates/index.html site_files | |
cp templates/style.css site_files | |
- name: Build the Kafka site | |
run: python ipper/main.py kafka output standalone cache/mailbox_files/kip_mentions.csv site_files/kafka.html | |
- name: Build the Flink site | |
run: python ipper/main.py flink output cache/flip_wiki_cache.json site_files/flink.html site_files/flips | |
- 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 | |