Skip to content

Documentation

Documentation #222

Workflow file for this run

name: Documentation
on:
schedule:
# run at 5am every day
- cron: '0 5 * * *'
push:
paths:
- '.github/workflows/docs.yml'
- 'doc/settings.json'
- 'doc/exclude_patterns.inc'
- 'doc/**'
pull_request:
paths:
- '.github/workflows/docs.yml'
- 'doc/settings.json'
- 'doc/exclude-patterns.inc'
- 'doc/**'
# Allow manually triggering the workflow.
workflow_dispatch: {}
env:
XCORE_DOC_BUILDER: 'ghcr.io/xmos/doc_builder:v2.0.0'
jobs:
build_documentation:
name: Build and package documentation
if: github.repository_owner == 'xmos'
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10.x'
- name: Pull doc_builder container
run: |
docker pull ${XCORE_DOC_BUILDER}
- name: Build documentation
run: |
# Move files specific to this repo
mv 'doc/settings.json' 'settings.json'
mv 'doc/substitutions.rst-inc' 'doc/substitutions.rst'
docker run --user "$(id -u):$(id -g)" \
--rm \
-v ${{ github.workspace }}:/build \
-e EXCLUDE_PATTERNS="/build/doc/exclude-patterns.inc" \
-e OUTPUT_DIR=/build/doc/_build_sw_pll \
-e PDF=1 \
-e DOXYGEN_INCLUDE=/build/doc/Doxyfile.inc \
-e DOXYGEN_INPUT=ignore ${XCORE_DOC_BUILDER}
- name: Save documentation artifacts
uses: actions/upload-artifact@v3
with:
name: docs-sw_pll
path: doc/_build_sw_pll
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
retention-days: 30