-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (50 loc) · 1.63 KB
/
deploy_docs.yml
File metadata and controls
57 lines (50 loc) · 1.63 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
name: Publish release documentation
on:
push:
branches: [main]
tags: [v*]
permissions:
contents: write
pages: write
jobs:
deploy:
runs-on: macos-latest # nicer screenshots
if: github.repository == 'pyapp-kit/scenex'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Config git
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git fetch origin gh-pages --depth=1
- name: Deploy release docs
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
VERSION=$(git describe --abbrev=0 --tags)
# check if rc or beta release
if [[ $VERSION == *"rc"* ]] || [[ $VERSION == *"beta"* ]]; then
export DOCS_PRERELEASE=true
echo "Deploying pre-release docs"
uv run mike deploy --push --update-aliases $VERSION rc
else
echo "Deploying release docs"
uv run mike deploy --push --update-aliases $VERSION latest
fi
env:
DOCS_DEV: false
# TODO: Remove once maturin supports 3.14
UV_PYTHON: "3.13"
- name: Deploy dev docs
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: uv run mike deploy --push --update-aliases dev
env:
DOCS_DEV: true
# TODO: Remove once maturin supports 3.14
UV_PYTHON: "3.13"
# - name: Update default release docs
# run: mike set-default --push latest