Skip to content
Merged
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
60 changes: 60 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Deploy Jupyter Book

on:
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/docs.yaml"
pull_request:
paths:
- "docs/**"
- ".github/workflows/docs.yaml"
workflow_dispatch:

permissions:
contents: write

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install Jupyter Book 2.0 and MyST
run: |
uv pip install --pre "jupyter-book==2.*" --system
npm install -g mystmd

- name: Build book
run: |
cd docs
rm -rf _build .jupyter_cache
myst clean || true
myst build --html
touch _build/html/.nojekyll
env:
BASE_URL: /policyengine-uk-data

- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/_build/html
clean: true
6 changes: 6 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- bump: minor
changes:
changed:
- Upgraded documentation to Jupyter Book 2.0 (MyST-based)
fixed:
- Jupyter Book deployment to GitHub Pages by adding docs workflow and fixing branch reference
24 changes: 0 additions & 24 deletions docs/_config.yml

This file was deleted.

12 changes: 0 additions & 12 deletions docs/_toc.yml

This file was deleted.

25 changes: 25 additions & 0 deletions docs/myst.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 1
project:
title: PolicyEngine UK data
authors:
- name:
given: PolicyEngine
family: Team
copyright: '2024'
github: policyengine/policyengine-uk-data
toc:
- file: intro.md
- file: methodology.ipynb
- file: validation/index.md
children:
- file: validation/national.ipynb
- file: validation/constituencies.ipynb
- file: validation/local_authorities.ipynb
- file: pension_contributions.ipynb
- file: constituency_methodology.ipynb
- file: LA_methodology.ipynb
site:
options:
logo: logo.png
folders: true
template: book-theme
Loading