Skip to content

yml updated

yml updated #85

Workflow file for this run

name: Deploy Sphinx Docs to GitHub Pages
on:
# Rebuild automatically when documentation or its assets change on main
push:
branches: [main]
paths:
- 'docs/**'
- 'pica/assets/**'
- 'publications/**'
- '.github/workflows/docs.yml'
# Keep the manual trigger for on-demand deploys
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow only one deployment at a time; let an in-progress deploy finish
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: 'pip'
cache-dependency-path: 'docs/requirements.txt'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build HTML documentation
run: sphinx-build -b html --keep-going docs/ docs/_build/html
- name: Mirror structure for images and publications
run: |
# The manual references images via "../pica/assets", so recreate
# that relative structure inside the build output.
mkdir -p docs/_build/html/pica
cp -r pica/assets docs/_build/html/pica/
# Copy publications folder (paper PDF + landing page)
cp -r publications docs/_build/html/publications
# Prevent GitHub from hiding folders starting with underscores
touch docs/_build/html/.nojekyll
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: 'docs/_build/html'
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
timeout-minutes: 10
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5