-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.65 KB
/
python-docs.yaml
File metadata and controls
61 lines (56 loc) · 1.65 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
61
# This file is @generated by <https://github.com/liblaf/copier-python>.
# DO NOT EDIT!
name: Python / Docs
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
FORCE_COLOR: 1
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- id: config
name: Configure GitHub Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6
- name: Set environment variables
run: echo 'SITE_URL=${{ steps.config.outputs.base_url }}' >> "$GITHUB_ENV"
- name: Setup uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
activate-environment: true
- name: Install dependencies
run: uv sync --active --frozen --all-packages
- name: Set site url
run: sed --in-place 's|__SITE_URL__|${{ steps.config.outputs.base_url }}|g' 'zensical.toml'
- name: Build
run: zensical build
- name: Upload Github Pages artifact
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
with:
path: site
deploy:
name: Deploy
permissions:
id-token: write
pages: write
needs:
- build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- id: deploy
name: Deploy Github Pages site
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5