-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (33 loc) · 1 KB
/
docs.yml
File metadata and controls
42 lines (33 loc) · 1 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
name: Push docs update
# push to the gh-pages branch whenever there is a new push to main or a new tag
on:
push:
branches:
- main
tags: ["*"]
workflow_dispatch:
permissions:
contents: write
env:
TAG: ${{ contains(github.ref, 'tags') && 'latest' || 'dev'}}
jobs:
push-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install dependencies
run: uv sync
- id: get_version
uses: battila7/get-version-action@v2
- name: configure git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git fetch origin gh-pages --depth=1
- name: Push changes to gh-pages branch
run: uv run mike deploy ${{ steps.get_version.outputs.version }} $TAG -u -p