test(reference): Leg Improvements reference branch #742
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 build and deploy | |
on: | |
push: | |
branches: [ master ] | |
tags: ['*'] | |
paths: | |
- 'Docs/**' | |
- 'CHANGELOG.md' | |
pull_request: | |
branches: [ master ] | |
paths: | |
- 'Docs/**' | |
- 'CHANGELOG.md' | |
workflow_dispatch: | |
concurrency: | |
group: ci-docs-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
sphinx-build: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install mamba | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-file: Docs/environment.yaml | |
- name: Build Documentation | |
shell: bash -l {0} | |
run: | | |
set -e | |
cd Docs | |
make html-dev | |
cd .. | |
mkdir -p public/beta | |
cp -rT Docs/_build/html public/beta | |
- name: Link check | |
shell: bash -l {0} | |
run: | | |
set -e | |
cd Docs | |
make linkcheck | |
- name: Build last tagged version | |
if: github.ref == 'refs/heads/master' | |
shell: bash -l {0} | |
run: | | |
git fetch --shallow-since=2020-07-07 | |
git checkout $(git describe --tags `git rev-list --tags=ammr* --max-count=1`); | |
cd Docs | |
make clean | |
make html | |
cd .. | |
cp -rT Docs/_build/html public | |
- name: Build new theme | |
if: github.ref == 'refs/heads/master' | |
shell: bash -l {0} | |
run: | | |
git checkout new_docs_theme; | |
cd Docs | |
make clean | |
make html-dev | |
cd .. | |
cp -rT Docs/_build/html public/new | |
- name: Deploy 🚀 | |
if: github.ref == 'refs/heads/master' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
external_repository: AnyBody/ammr-doc | |
publish_branch: gh-pages | |
publish_dir: ./public |