-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (52 loc) · 1.47 KB
/
docs-publish.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
57
58
59
60
61
62
63
64
65
on:
push:
branches:
- main
paths:
- "docs/**/*"
- .github/workflows/docs-publish.yml
workflow_dispatch:
name: Docs - Publish
env:
UV_VERSION: "0.4.x"
PYTHON_VERSION: 3.12
permissions:
contents: write
pages: write
jobs:
docs-publish:
runs-on: ubuntu-latest
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # full history needed for correct versioning of py pkg
- name: 🔵 Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.6.26
- name: 🚀 Install uv
uses: astral-sh/setup-uv@v3
with:
version: ${{ env.UV_VERSION }}
- name: 🐍 Set up Python ${{ env.PYTHON_VERSION }}
run: uv python install ${{ env.PYTHON_VERSION }}
- name: 📦 Install chatlas and dependencies
run: uv sync --python ${{ env.PYTHON_VERSION }} --all-extras
- name: 🔌 Activate venv
run: |
source .venv/bin/activate
echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
- name: Run quartodoc
run: make quartodoc
- name: 🚢 Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
path: docs
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}