[770c98]: / .github / workflows / ammr-doc.yaml

Download this file

113 lines (87 with data), 2.8 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
name: Documentation build and deploy
on:
push:
branches: [ master ]
tags: ['*']
pull_request:
branches: [ master ]
workflow_dispatch:
concurrency:
group: ci-docs-${{ github.ref }}
cancel-in-progress: true
jobs:
build-latest:
runs-on: ubuntu-latest
if: github.repository == 'anybody/ammr' || github.event_name != 'push'
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.8.7
with:
environments: docs
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
activate-environment: docs
- name: Link check
run: |
cd Docs
sphinx-build -M linkcheck . _build -W --keep-going -a -q
- name: Build Documentation
run: |
cd Docs
rm -rf _build
sphinx-build -M html . _build -W --keep-going -a -t draft
- uses: actions/upload-artifact@v4
with:
name: beta-version
path: Docs/_build/html
build-tagged:
runs-on: ubuntu-latest
if: (github.repository == 'anybody/ammr' || github.event_name != 'push') && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout last tagged version
run: |
git checkout $(git describe --tags `git rev-list --tags=ammr* --max-count=1`);
- uses: prefix-dev/setup-pixi@v0.8.7
with:
environments: docs
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
activate-environment: docs
- name: Build Documentation
run: |
cd Docs
sphinx-build -M html . _build -a
- uses: actions/upload-artifact@v4
with:
name: tagged-version
path: Docs/_build/html
prepare-pages:
needs: [build-latest, build-tagged]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: tagged-version
path: public
- uses: actions/download-artifact@v4
with:
name: beta-version
path: public/beta
- uses: actions/upload-pages-artifact@v3
with:
path: public
deploy:
needs: prepare-pages
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4