-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (63 loc) · 1.57 KB
/
Copy pathdocs.yml
File metadata and controls
69 lines (63 loc) · 1.57 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
62
63
64
65
66
67
68
69
name: Docs
on:
push:
branches: [main]
paths:
- "docs/**"
- "src/capa/**"
- "zensical.toml"
- ".github/workflows/docs.yml"
pull_request:
paths:
- "docs/**"
- "src/capa/**"
- "zensical.toml"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: docs-deploy
cancel-in-progress: false
env:
FORCE_COLOR: "1"
UV_FROZEN: "1"
jobs:
build:
name: zensical build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0 # hatch-vcs needs full history
- name: Install uv
uses: astral-sh/setup-uv@v9.0.0
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install docs extras
run: uv sync --group docs
- name: Build
run: uv run zensical build --clean
- if: github.event_name == 'push'
uses: actions/upload-artifact@v7
with:
name: site
path: site/
deploy:
name: Deploy to Cloudflare Pages
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/download-artifact@v8
with:
name: site
path: ./site
- uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy site --project-name=capa-docs --branch=main