Fix docs CI by pinning dependency #52
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: Build and Docs CI | |
on: | |
push: | |
branches: | |
# Add more branches here to publish docs from other branches | |
- master | |
- main | |
tags: | |
- "*" | |
pull_request: | |
# Global environment | |
env: | |
# EPICS Base version for system block IOC | |
EPICSDBBUILDER_VERSION: 1.5 | |
jobs: | |
build: | |
name: "Build and Docs CI" | |
runs-on: ubuntu-latest | |
container: ghcr.io/epics-containers/epics-base-developer:7.0.8ec2 | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v2 | |
with: | |
# require history to get back to last tag for version number of branches | |
fetch-depth: 0 | |
submodules: true | |
- name: Install Packages | |
# Pin Sphinx version to one that supports Python3, but does not feature an API | |
# change that would break our custom cdomain.py extension | |
# Pin Jinja2, alabaster, and sphinxcontrib-applehelp to fix dependency issue between them and sphinx | |
run: | | |
pip install epicsdbbuilder==${EPICSDBBUILDER_VERSION} sphinx==2.3.1 Jinja2==3.0.3 alabaster==0.7.12 sphinxcontrib-applehelp==1.0.7 | |
- name: Build (including docs) | |
run: | | |
echo "EPICS_BASE=${EPICS_BASE}" > configure/RELEASE | |
echo "EPICS_BASE=${EPICS_BASE}" >> examples/basic_ioc/configure/RELEASE | |
echo "EPICS_BASE=${EPICS_BASE}" >> examples/example_ioc/configure/RELEASE | |
echo "SPHINXBUILD=sphinx-build" >> configure/CONFIG_SITE | |
make | |
- name: Build Examples | |
run: | | |
make -C examples/example_ioc/ | |
make -C examples/basic_ioc/ | |
- name: Move Docs to versioned directory | |
# e.g. master or 0.1.2 | |
run: mv docs/html ".github/pages/${GITHUB_REF##*/}" | |
- name: Publish Docs to gh-pages | |
# Only master and tags are published | |
if: "${{ github.repository_owner == 'dls-controls' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')) }}" | |
# We pin to the SHA, not the tag, for security reasons. | |
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions | |
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: .github/pages | |
keep_files: true |