Skip to content

Commit 04ca381

Browse files
workflows updated
1 parent 12045b6 commit 04ca381

2 files changed

Lines changed: 36 additions & 23 deletions

File tree

.github/workflows/docs.yml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,65 @@
11
name: Deploy Sphinx Docs to GitHub Pages
22

33
on:
4+
# Rebuild automatically when documentation or its assets change on main
5+
push:
6+
branches: [main]
7+
paths:
8+
- 'docs/**'
9+
- 'pica/assets/**'
10+
- 'publications/**'
11+
- '.github/workflows/docs.yml'
12+
# Keep the manual trigger for on-demand deploys
413
workflow_dispatch:
514

615
permissions:
716
contents: read
817
pages: write
918
id-token: write
1019

20+
# Allow only one deployment at a time; let an in-progress deploy finish
1121
concurrency:
1222
group: "pages"
1323
cancel-in-progress: false
1424

1525
jobs:
1626
build:
1727
runs-on: ubuntu-latest
28+
timeout-minutes: 15
1829
steps:
1930
- name: Checkout repository
20-
uses: actions/checkout@v4.1.7
21-
31+
uses: actions/checkout@v4
32+
2233
- name: Set up Python
2334
uses: actions/setup-python@v5
2435
with:
25-
python-version: '3.10'
26-
36+
python-version: '3.12'
37+
cache: 'pip'
38+
cache-dependency-path: 'docs/requirements.txt'
39+
2740
- name: Install dependencies
2841
run: |
2942
python -m pip install --upgrade pip
30-
pip install sphinx myst-parser sphinx-rtd-theme
31-
43+
pip install -r docs/requirements.txt
44+
3245
- name: Build HTML documentation
33-
run: |
34-
# 1. Build the documentation
35-
sphinx-build -b html docs/ docs/_build/html
46+
run: sphinx-build -b html --keep-going docs/ docs/_build/html
3647

37-
- name: Mirror Structure for Images
48+
- name: Mirror structure for images and publications
3849
run: |
39-
# This step makes "../pica/assets" work without changing your manual.
40-
# We create a folder structure inside the build output that matches
41-
# your relative paths.
42-
50+
# The manual references images via "../pica/assets", so recreate
51+
# that relative structure inside the build output.
4352
mkdir -p docs/_build/html/pica
4453
cp -r pica/assets docs/_build/html/pica/
45-
46-
# Copy publications folder
47-
cp -r publications/ docs/_build/html/publications/ || true
48-
49-
# CRITICAL: Prevent GitHub from hiding folders starting with underscores
54+
55+
# Copy publications folder (paper PDF + landing page)
56+
cp -r publications docs/_build/html/publications
57+
58+
# Prevent GitHub from hiding folders starting with underscores
5059
touch docs/_build/html/.nojekyll
51-
60+
5261
- name: Upload GitHub Pages artifact
53-
uses: actions/upload-pages-artifact@v3.0.1
62+
uses: actions/upload-pages-artifact@v3
5463
with:
5564
path: 'docs/_build/html'
5665

@@ -60,7 +69,8 @@ jobs:
6069
url: ${{ steps.deployment.outputs.page_url }}
6170
runs-on: ubuntu-latest
6271
needs: build
72+
timeout-minutes: 10
6373
steps:
6474
- name: Deploy to GitHub Pages
6575
id: deployment
66-
uses: actions/deploy-pages@v4.0.5
76+
uses: actions/deploy-pages@v4

.github/workflows/draft-pdf.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Draft PDF
2-
on: [push]
2+
3+
# Disabled automatic runs for now; trigger manually from the Actions tab.
4+
on:
5+
workflow_dispatch:
36

47
jobs:
58
paper:

0 commit comments

Comments
 (0)