-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.44 KB
/
docs.yml
File metadata and controls
47 lines (40 loc) · 1.44 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
name: Deploy MkDocs to Github Pages
on:
release:
types:
- published
push:
branches:
- main
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up UV
uses: astral-sh/setup-uv@v6
- name: Install Dependencies
run: |
uv sync --extra dev --extra docs
- name: Set up git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Build and upload docs (release)
if: ${{ github.event_name == 'release' && github.event.action == 'published' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
uv run mike deploy --update-aliases --allow-empty --push "${{ github.event.release.tag_name }}" latest
uv run mike set-default --push latest
- name: Build and upload docs (dev)
if: ${{ github.event_name == 'push' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
uv run mike deploy --update-aliases --allow-empty --push dev