-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (53 loc) · 1.77 KB
/
docs-release.yml
File metadata and controls
65 lines (53 loc) · 1.77 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
name: Deploy release docs
on:
workflow_run:
workflows: ["Generate changelog"]
types: [completed]
permissions:
contents: write
concurrency:
group: docs-deploy
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout release tag
id: checkout
uses: TaiSakuma/checkout-version-tag@v1
with:
trigger-tag: ${{ github.event.workflow_run.head_branch }}
- name: Extract version
id: version
run: echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
env:
TAG: ${{ steps.checkout.outputs.release-tag }}
- uses: astral-sh/setup-uv@v7
- uses: ./.github/actions/build-docs
id: build
with:
subdir: ${{ steps.version.outputs.version }}
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- uses: ./.github/actions/deploy-to-gh-pages
with:
site-dir: ${{ steps.build.outputs.site-dir }}
target: ${{ steps.version.outputs.version }}
commit-message: Deploy docs for v${{ steps.version.outputs.version }}
- name: Update latest
run: |
git worktree add /tmp/gh-pages gh-pages
cd /tmp/gh-pages
rm -rf latest
cp -r "${{ steps.build.outputs.site-dir }}" latest
git add latest
git commit -m "Update latest"
git push origin gh-pages
- run: git worktree remove /tmp/gh-pages
- uses: ./.github/actions/update-index
with:
repo-name: ${{ github.event.repository.name }}
repo-url: ${{ github.event.repository.html_url }}