-
Notifications
You must be signed in to change notification settings - Fork 3
78 lines (68 loc) · 1.93 KB
/
docs-release.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
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
name: "Docs: Release to GitHub pages"
concurrency:
group: gh-pages
cancel-in-progress: false
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.ci/mkdocs/mkdocs.yaml'
- '.github/workflows/docs-release.yaml'
- "docs/**"
permissions:
contents: write
pages: write
deployments: write
jobs:
release-docs:
name: Release documentation
runs-on: ubuntu-22.04
steps:
- name: Checkout charts branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: "src"
fetch-depth: 0
- name: Checkout gh-pages branch
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: "dest"
ref: "gh-pages"
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install mkdocs
shell: bash
working-directory: src
run: |
pip install -r ./.ci/mkdocs/requirements.txt
- name: Sync charts docs
shell: bash
working-directory: src
run: |
task docs:charts
- name: Build documentation
shell: bash
working-directory: src
run: |
mkdocs build --config-file ./.ci/mkdocs/mkdocs.yaml -d "$PWD/../dest/docs"
- name: Commit changes
shell: bash
working-directory: dest
run: |
git config user.name "zekker6-bot[bot]"
git config user.email "zekker6-bot <87358111+zekker6-bot[bot]@users.noreply.github.com>"
git add docs
git commit -m "Updated docs from ref: $GITHUB_SHA"
git push