Documentation update following review #40
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Documentation | |
on: | |
schedule: | |
# run at 5am every day | |
- cron: '0 5 * * *' | |
push: | |
paths: | |
- '.github/workflows/docs.yml' | |
- 'settings.json' | |
- 'doc/exclude_patterns.inc' | |
- '**/doc/**' | |
pull_request: | |
paths: | |
- '.github/workflows/docs.yml' | |
- 'settings.json' | |
- 'doc/exclude-patterns.inc' | |
- '**/doc/**' | |
# Allow manually triggering the workflow. | |
workflow_dispatch: {} | |
env: | |
XCORE_DOC_BUILDER: 'ghcr.io/xmos/doc_builder:v3.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: | | |
pwd | |
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" -e PDF=1 -e SKIP_LINK=1 -e DOXYGEN_INCLUDE=/build/doc/Doxyfile.inc -e DOXYGEN_INPUT=ignore ${XCORE_DOC_BUILDER} | |
tree | |
DOC_VERSION=$(grep version settings.json | grep -o "[0-9]*\.[0-9]*\.[0-9]") | |
mv doc/_build/pdf/programming_guide.pdf doc/_build/pdf/programming_guide_v${DOC_VERSION}.pdf | |
- name: Save documentation artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs lib_src | |
path: doc/_build | |
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn` | |
retention-days: 30 |