-
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.67 KB
/
Copy pathdocs.yml
File metadata and controls
60 lines (51 loc) · 1.67 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
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Deploy docs
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
# setuptools-scm uses tags to get the current version, fetch history and tags
# to get correct version
fetch-depth: 0
fetch-tags: 'true'
- name: Determine FineCode log level
run: |
if [ "${RUNNER_DEBUG:-0}" = "1" ]; then
echo "FINECODE_LOG_LEVEL=DEBUG" >> "$GITHUB_ENV"
else
echo "FINECODE_LOG_LEVEL=INFO" >> "$GITHUB_ENV"
fi
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.14'
# Same cache key pattern as ci-cd.yml so a preceding CI run on the same commit
# can seed this cache and skip most of the install work.
- name: Cache all venvs
uses: actions/cache@v4
with:
path: |
.venvs
**/.venvs
key: ${{ runner.os }}-venvs-${{ hashFiles('**/pyproject.toml', '**/preset.toml') }}
- name: Install dependencies
run: sh scripts/setup-dev-workspace.sh
- name: Build docs
env:
MKDOCS_SITE_URL: https://finecode-dev.github.io
run: |
source .venvs/dev_workspace/bin/activate
python -m finecode run --log-level="$FINECODE_LOG_LEVEL" build_docs
- name: Deploy to finecode.github.io
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.PAGES_DEPLOY_TOKEN }}
external_repository: finecode-dev/finecode.github.io
publish_branch: main
publish_dir: ./site