-
Notifications
You must be signed in to change notification settings - Fork 29
48 lines (39 loc) · 1.15 KB
/
documentation.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
name: Documentation
on:
workflow_dispatch:
push:
branches: [master, dev]
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
# UV_INDEX_STRATEGY: "unsafe-first-match"
# UV_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu"
PIP_EXTRA_INDEX_URL: "https://download.pytorch.org/whl/cpu"
jobs:
Documentation:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: 'pip'
- run: echo WEEK=$(date +%V) >>$GITHUB_ENV
shell: bash
# - uses: hynek/setup-cached-uv@v1
# with:
# cache-suffix: -docs-${{ matrix.python-version }}-${{ env.WEEK }}
- name: Install dependencies
run: |
pip install '.[docs]'
# uv venv
# uv pip install '.[docs]'
- name: Set up Git
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
- name: Build documentation
run: |
git fetch origin gh-pages
mike delete $BRANCH_NAME
mike deploy --push $BRANCH_NAME
# source .venv/bin/activate