Skip to content

Update index.html

Update index.html #10

name: Build report and deploy site
# Pipeline: generate -> verify -> build -> deploy.
#
# Generated artifacts (sweep CSVs, site/data.json, report figures, report.pdf) are NOT tracked in git
# Requires: Settings -> Pages -> Source = "GitHub Actions".
on:
push:
branches: [main, stateful]
tags: ['v*']
workflow_dispatch:
permissions:
contents: write # release uploads (tags only)
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
env:
GENERATED_PATHS: |
utils/all_size_capped_candidates.csv
utils/all_unbound_candidates.csv
utils/global_X_thresholds.csv
utils/master_extremes_summary.csv
site/data.json
document/content/images/sieve_step*.png
document/content/images/concentric_diagram.png
document/content/images/scatter_plot.png
document/content/images/comparison_regular.png
document/content/images/comparison_normalized.png
document/content/images/ideal_candidate_balanced.png
document/content/images/ideal_candidate_best.png
jobs:
generate:
runs-on: ubuntu-latest
timeout-minutes: 90
container:
image: sagemath/sagemath:10.4 # pinned; bump deliberately and re-verify
options: --user root # image's default user cannot write the runner workspace
steps:
- uses: actions/checkout@v4
- name: Restore generated artifacts (keyed on generator sources)
id: cache
uses: actions/cache@v4
with:
path: ${{ env.GENERATED_PATHS }}
key: generated-v1-${{ hashFiles('costs.sage', 'security.sage', 'slhdsa-2to40.sage', 'stateful.sage', 'export_site_data.sage', 'octopus_pmf.py', 'utils/*.py', 'Makefile') }}
- name: Generate (sweeps, derived tables, data.json, figures)
if: steps.cache.outputs.cache-hit != 'true'
run: |
apt-get update -qq && apt-get install -y -qq make
sage -pip install --quiet --no-cache-dir pandas seaborn
make sweeps derived data figures PYTHON="sage -python"
- name: Upload generated artifacts
uses: actions/upload-artifact@v4
with:
name: generated
path: ${{ env.GENERATED_PATHS }}
build_and_deploy:
needs: generate
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Place generated artifacts into the tree
uses: actions/download-artifact@v4
with:
name: generated
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Regression suite (generated artifacts required)
run: GENERATED_REQUIRED=1 python3 tests/test_regression.py
- name: Compile report
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
working_directory: document
- name: Place PDF into the site
run: cp document/main.pdf site/report.pdf
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: . # whole tree, preserving the /site/... URL structure
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Attach data + report to release (tags only)
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
site/report.pdf
site/data.json
utils/all_size_capped_candidates.csv
utils/all_unbound_candidates.csv