-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (50 loc) · 1.39 KB
/
mkdocs-publish.yml
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
name: Publish MkDocs Documentation
on:
workflow_dispatch:
inputs:
version:
description: 'Version to deploy (e.g. 20.0)'
required: true
default: '20.0'
type: string
update_latest:
description: 'Update this as latest version?'
required: true
default: true
type: boolean
permissions:
contents: write
pages: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for mike to work properly
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set up Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install \
mike \
mkdocs-material \
mkdocs-macros-plugin \
mkdocs-monorepo-plugin \
mkdocs-site-urls \
mkdocs-caption \
markdown-tables-extended
- name: Deploy documentation
run: |
if [ "${{ inputs.update_latest }}" = "true" ]; then
mike deploy --push ${{ inputs.version }} latest
else
mike deploy --push ${{ inputs.version }}
fi