Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Fix ammr-doc links #116

Fix ammr-doc links

Fix ammr-doc links #116

Workflow file for this run

name: Build Tutorials
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
inputs:
run_deploy:
description: 'Should newest tag be deployed?'
required: false
default: ""
jobs:
build-official-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout last tagged
if: "github.event.inputs.run_deploy"
run: |
git checkout $(git describe --tags `git rev-list --tags --max-count=1`);
- name: Setup conda
if: "github.event.inputs.run_deploy"
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: sphinx
environment-file: environment.yaml
channels: conda-forge
- name: Build last tagged version
if: "github.event.inputs.run_deploy"
shell: bash -l {0}
run: |
make clean
make html O="-W"
- name: Deploy 🚀
if: "github.event.inputs.run_deploy"
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: AnyBody/tutorials
publish_branch: gh-pages
publish_dir: _build/html
sphinx-build:
runs-on: ubuntu-latest
needs: [build-official-version]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: sphinx
environment-file: environment.yaml
channels: conda-forge
- uses: ammaraskar/sphinx-problem-matcher@master
# if: github.ref != 'refs/heads/master'
- name: Build Documentation
shell: bash -l {0}
run: |
make html O="-W"
- name: Check links
shell: bash -l {0}
run: |
make linkcheck
- name: Deploy 🚀
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: AnyBody/tutorials
publish_branch: gh-pages
publish_dir: _build/html
destination_dir: dev