-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (73 loc) · 2.27 KB
/
docs.yaml
File metadata and controls
88 lines (73 loc) · 2.27 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Publish Documentation
on:
push:
paths:
- .github/workflows/docs.yaml
- docs/**
- mkdocs.yml
- requirements-docs.txt
branches:
- main
release:
types:
- released
- prereleased
permissions:
contents: write
pages: write
id-token: write
jobs:
prepare:
name: Get Current version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.value }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Find Latest Tag
id: latest_tag
uses: oprypin/find-latest-tag@dd2729fe78b0bb55523ae2b2a310c6773a652bd1 # v1.1.2
with:
repository: ${{ github.repository }}
regex: '^v\d+\.\d+\.\d+$'
- name: Extract major and minor version
id: version
run: |
echo "value=`echo ${{ steps.latest_tag.outputs.tag }} | sed -r 's|([0-9]+.[0-9]+).*|\1|g'`" >> $GITHUB_OUTPUT
- name: Computed Doc Version
run: echo ${{ steps.version.outputs.value }}
publish-docs:
name: Publish Docs
runs-on: ubuntu-24.04
needs:
- prepare
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: "Import GPG key"
id: import-gpg
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6
with:
gpg_private_key: ${{ secrets.HOTHER_BOT_GPG_KEY }}
passphrase: ${{ secrets.HOTHER_BOT_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Configurating Git
run: |
git config user.email "${{ steps.import-gpg.outputs.email }}"
git config user.name "${{ steps.import-gpg.outputs.name }}"
git config core.autocrlf false
git config commit.gpgsign true
- name: Setup Python and uv
uses: ./.github/actions/setup-python-uv
with:
dependency-groups: doc
- name: Publish
run: |
uv run mike deploy --push --update-aliases "${{ needs.prepare.outputs.version }}" latest
uv run mike deploy --push --update-aliases "${{ needs.prepare.outputs.version }}" docs
uv run mike set-default --push latest