-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (34 loc) · 1.12 KB
/
docs-publish.yaml
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
name: Build, validate, publish, version documentation for GitHub Pages
on:
push:
branches:
- master
- develop
- feature/*
- release/*
- hotfix/*
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
docs-publish:
name: Build, validate, publish, version documentation for GitHub Pages
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Python dependencies
run: pip install -r docs/requirements.txt
- name: Build, validate documentation using MkDocs
run: |
mkdocs build --verbose --clean --strict
rm -r site/
- name: Build, publish, version documentation using Mike (only for stable tags)
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "Configure Git user.name and user.email."
git config user.name github-actions
git config user.email github-actions@github.com
VERSION=${GITHUB_REF#refs/tags/}
mike deploy --update-aliases --push --rebase "${VERSION}" latest