Skip to content

build: upgrade to sphinx 8.0 #32

build: upgrade to sphinx 8.0

build: upgrade to sphinx 8.0 #32

Workflow file for this run

name: Build
on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'
workflow_dispatch:
inputs:
deploy:
description: 'Enable deployment'
type: boolean
permissions: {}
env:
SPHINXOPTS: --color --fail-on-warning --keep-going --nitpicky
jobs:
html:
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract version
id: version
run: |
v=$(sed -nE "s/^version\s*=\s*['\"]([0-9]+(\.[0-9]+){0,3})['\"]/\1/p" conf.py)
if [[ -z $v ]]; then
echo "::error::Could not find a valid version in conf.py"
exit 1
fi
echo "version=$v" >> "$GITHUB_OUTPUT"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Generate HTML
run: |
export SOURCE_DATE_EPOCH="$(git log -1 --format=%ct)"
make html
- name: Upload HTML
uses: actions/upload-artifact@v4
with:
name: ndn-packet-spec-html
path: _build/html
if-no-files-found: error
pdf:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
sudo apt-get install -Uy --no-install-recommends latexmk \
texlive-latex-extra texlive-fonts-recommended tex-gyre
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Generate PDF
run: |
export SOURCE_DATE_EPOCH="$(git log -1 --format=%ct)"
make latexpdf
- name: Upload PDF
uses: actions/upload-artifact@v4
with:
name: ndn-packet-spec-pdf
path: _build/latex/ndn-packet-spec.pdf
if-no-files-found: error
deploy:
if: (github.event_name == 'push' && github.ref_name == 'master') || (github.event_name == 'workflow_dispatch' && inputs.deploy)
needs: html
uses: named-data/actions/.github/workflows/docs-deployment.yml@v1
with:
artifact-name: ndn-packet-spec-html
version: ${{ needs.html.outputs.version }}
secrets: inherit