Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Website

# The HTML pages in docs/ are generated from problems.yaml and are not
# committed. Pull requests (including those from forks) only check that the
# pages can be built; deploying happens exclusively from main, so code from a
# pull request never runs with write permissions.

on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
persist-credentials: false

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.10"

- name: Install the project
run: uv sync --all-extras --dev

- name: Generate html
run: uv run yaml_to_html.py

- name: Upload pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: docs/

deploy:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
31 changes: 0 additions & 31 deletions .github/workflows/run_to_html.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,7 @@ __marimo__/

# Mac stuff
.DS_Store

# Generated by yaml_to_html.py and deployed by .github/workflows/pages.yml
docs/index.html
docs/problems.html
Loading
Loading