Repository navigation
52 lines (48 loc) · 1.95 KB
/
Copy pathdeploy.yml
File metadata and controls
52 lines (48 loc) · 1.95 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
# documentation: https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: deploy documentation (only on push to main branch)
on:
push:
branches: main
# Add option to deploy manually, e.g. because there is a new EESSI test suite release and we want updated API docs
workflow_dispatch:
# Declare default permissions as read only.
permissions: read-all
jobs:
build:
runs-on: ubuntu-24.04
permissions:
# Need to be able to write to the deploy branch
contents: write
steps:
- name: checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # need to fetch all history to ensure correct Git revision dates in docs
- name: set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.14'
- name: install mkdocs + plugins
run: |
pip install -r requirements.txt
pip list | grep mkdocs
mkdocs --version
# Make sure to also deploy auto-generated API docs for test suite
# For that, we need the repo to be available under eessi/test-suite
- name: checkout test suite
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: eessi/test-suite
# Path is needed, otherwise this will overwrite the checkout action that cloned the docs repo
path: test-suite/test-suite
- name: generate docs for latest release
run: |
cd test-suite/test-suite
# Make sure to fetch tags, so we can checkout a particular release
git fetch --tags
# This assumes we stick to a version-tagging scheme vX.Y.Z
LATEST_VERSION=$(git tag | grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+$' | sort -t. -k 1,1n -k 2,2n -k 3,3n | tail -1)
# Use the latest release by default
git checkout $LATEST_VERSION
- name: build tutorial
run: make test && make deploy