Skip to content

Replaced dls-controls with epics-python #225

Replaced dls-controls with epics-python

Replaced dls-controls with epics-python #225

Workflow file for this run

name: Docs CI
on:
push:
pull_request:
jobs:
build:
strategy:
matrix:
# Whether we are building all versions of the docs, or just checking they build
publish: ["${{ github.repository_owner == 'dls-controls' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')) }}"]
name: "Docs CI (publish=${{ matrix.publish }})"
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v2
with:
# require all of history to see all tagged versions' docs
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install Python Dependencies
run: |
pip install pipenv
pipenv install --dev --deploy --python $(which python) && pipenv graph
- name: Deploy index
if: matrix.publish
# We pin to the SHA, not the tag, for security reasons.
# https://docs.github.com/en/free-pro-team@latest/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
- name: Checkout gh-pages
if: matrix.publish
# As we already did a deploy of gh-pages above, it is guaranteed to be there
# so check it out so we can selectively build docs below
uses: actions/checkout@v2
with:
ref: gh-pages
path: build/html
- name: Maybe use sphinx-multiversion
# If we are building master or a tag we will publish
if: matrix.publish
# So use the args we normally pass to sphinx-build, but run sphinx-multiversion
run: mv $(pipenv --venv)/bin/sphinx-multiversion $(pipenv --venv)/bin/sphinx-build
- name: Build Docs
run: pipenv run docs
- name: Publish Docs to gh-pages
# Only master and tags are published
if: matrix.publish
# We pin to the SHA, not the tag, for security reasons.
# https://docs.github.com/en/free-pro-team@latest/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: build/html
keep_files: true