-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (52 loc) · 1.36 KB
/
deploy.yml
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
name: Publish
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'README.md'
- 'overrides/**'
- 'docs/**'
- 'mkdocs.yml'
- 'uv.lock'
repository_dispatch:
types: [build]
permissions:
contents: write
pages: write
id-token: write
env:
FETCH_SUBMODULE: false # change this to true if you use submodule for the docs
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
fetch-depth: 0
submodules: 'recursive'
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: "Submodule fetching"
continue-on-error: true
if: ${{ env.FETCH_SUBMODULE }}
run: |
git submodule update --init --recursive --checkout -f --remote -- "docs"
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
git commit -am "chore (update): fetch submodule"
git push
- name: Install python
run: uv python install
- name: Install dependencies
run: |
uv sync --no-dev
- name: Build
run: |
uv run mkdocs gh-deploy --force