-
Notifications
You must be signed in to change notification settings - Fork 188
55 lines (47 loc) · 1.65 KB
/
Copy pathrebuild_docs.yml
File metadata and controls
55 lines (47 loc) · 1.65 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
name: Rebuild older docs versions
on:
workflow_dispatch:
inputs:
versions:
description: 'Space-separated list of versions to rebuild (e.g. "v3.1.14 v3.1.13")'
required: true
default: 'v3.2.2 v3.2.01 v3.1.14 v3.1.13 v3.1.12 v3.1.11 v3.1.10 v3.1.9 v3.1.8 v3.1.6 v3.1.5 v3.1.4 v3.1.3 v3.1.2 v3.1.1 v3.1.0 v3.0.4 v3.0.3 v3.0.2 v3.0.1 v3.0.0 v3.0.0-beta'
defaults:
run:
shell: bash
jobs:
rebuild:
name: Rebuild documentation for older versions
concurrency: publish
runs-on: ubuntu-latest
timeout-minutes: 30
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
steps:
- name: 🔍 API_TOKEN_GITHUB
if: env.API_TOKEN_GITHUB == ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "API_TOKEN_GITHUB=${GITHUB_TOKEN}" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ env.API_TOKEN_GITHUB }}
- uses: c-py/action-dotenv-to-setenv@v5
with:
env-file: .github/variables/.env
- uses: FranzDiebold/github-env-vars-action@v2.8.0
- name: Install mkdocs stack
run: |
pip install mkdocs
pip install mkdocs-git-revision-date-localized-plugin
pip install mkdocs-material
pip install git+https://github.com/jimporter/mike.git
- name: Rebuild specified versions
run: |
for VERSION in ${{ inputs.versions }}; do
echo "=== Rebuilding $VERSION ==="
git checkout "tags/${VERSION}" -- docs/
mike deploy -p "${VERSION}"
git checkout HEAD -- docs/ mkdocs.yml
done