-
-
Notifications
You must be signed in to change notification settings - Fork 86
66 lines (56 loc) · 1.44 KB
/
Copy pathdocs.yml
File metadata and controls
66 lines (56 loc) · 1.44 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
name: Documentation
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'zensical.toml'
- '.github/workflows/docs.yml'
pull_request:
paths:
- 'docs/**'
- 'zensical.toml'
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install Zensical
run: pip install zensical
- name: Build documentation
run: zensical build --clean
- name: Smoke-test built site
run: make docs-smoke
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: docs-site
path: site/
deploy:
needs: build
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Download artifact
uses: actions/download-artifact@v7
with:
name: docs-site
path: site/
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy site --project-name=rumdl-dev