Skip to content

Commit 1b85d3a

Browse files
MaxGhenisclaude
andcommitted
Use myst build and gh-pages deployment like us-data
- Use myst build --html instead of jupyter book build - Set BASE_URL=/policyengine-uk-data for correct GitHub Pages paths - Create .nojekyll file in build output - Deploy to gh-pages branch using JamesIves/github-pages-deploy-action - Fix author name format in myst.yml to avoid warnings - Matches working policyengine-us-data deployment pattern 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b82c54c commit 1b85d3a

2 files changed

Lines changed: 17 additions & 26 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,10 @@ on:
1414
workflow_dispatch:
1515

1616
permissions:
17-
contents: read
18-
pages: write
19-
id-token: write
20-
21-
concurrency:
22-
group: "pages"
23-
cancel-in-progress: false
17+
contents: write
2418

2519
jobs:
26-
build:
20+
build-and-deploy:
2721
runs-on: ubuntu-latest
2822
steps:
2923
- name: Checkout
@@ -48,22 +42,17 @@ jobs:
4842
- name: Build book
4943
run: |
5044
cd docs
51-
echo "Y" | jupyter book || true
52-
jupyter book build --html
53-
54-
- name: Upload artifact
55-
uses: actions/upload-pages-artifact@v3
56-
with:
57-
path: docs/_build/html
45+
rm -rf _build .jupyter_cache
46+
myst clean || true
47+
myst build --html
48+
touch _build/html/.nojekyll
49+
env:
50+
BASE_URL: /policyengine-uk-data
5851

59-
deploy:
60-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
61-
environment:
62-
name: github-pages
63-
url: ${{ steps.deployment.outputs.page_url }}
64-
runs-on: ubuntu-latest
65-
needs: build
66-
steps:
6752
- name: Deploy to GitHub Pages
68-
id: deployment
69-
uses: actions/deploy-pages@v4
53+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
54+
uses: JamesIves/github-pages-deploy-action@v4
55+
with:
56+
branch: gh-pages
57+
folder: docs/_build/html
58+
clean: true

docs/myst.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ version: 1
22
project:
33
title: PolicyEngine UK data
44
authors:
5-
- name: PolicyEngine
5+
- name:
6+
given: PolicyEngine
7+
family: Team
68
copyright: '2024'
79
github: policyengine/policyengine-uk-data
810
toc:

0 commit comments

Comments
 (0)