-
Notifications
You must be signed in to change notification settings - Fork 4
122 lines (104 loc) · 2.98 KB
/
Copy pathdocs.yaml
File metadata and controls
122 lines (104 loc) · 2.98 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Documentation
permissions:
contents: read
on:
push:
pull_request:
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
if: github.event_name != 'schedule'
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- id: install-uv
name: Install uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.10.7"
enable-cache: true
cache-dependency-glob: "uv.lock"
- id: install-python
name: Install Python
run: uv python install 3.13
- id: install-python-dependencies
name: Install Python dependencies
run: make install-docs
- id: build-sphinx-documentation
name: Build Sphinx documentation
run: make docs-check
- name: Prune uv cache
run: uv cache prune --ci
- id: upload-release-candidate
name: Upload release candidate
uses: actions/upload-artifact@v7
with:
name: release-candidate
path: ./docs/_build/html/
if-no-files-found: error
retention-days: 7
linkcheck:
name: Check documentation links
runs-on: ubuntu-latest
if: github.event_name == 'schedule'
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Setup uv
uses: astral-sh/setup-uv@v10.0.1
with:
version: "0.10.7"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install Python dependencies
run: make install-docs
- name: Check documentation links
run: make linkcheck
- name: Prune uv cache
run: uv cache prune --ci
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref_name == 'main' && vars.DOCS_DEPLOY_ENABLED == 'true'
environment: docs-production
permissions:
contents: read
id-token: write
concurrency:
group: docs-deploy
cancel-in-progress: true
steps:
- name: Download release candidate
uses: actions/download-artifact@v8
with:
name: release-candidate
path: docs-site
- id: configure-aws
name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ vars.DOCS_AWS_ROLE_ARN }}
aws-region: ${{ vars.DOCS_AWS_REGION }}
- id: upload-to-s3
name: Upload documentation to Amazon S3
uses: datadesk/delivery-deploy-action@v1
with:
bucket: ${{ secrets.DOCS_AWS_BUCKET }}
base-path: ${{ secrets.DOCS_AWS_BASE_PATH }}
dir: ./docs-site
should-cache: false
use-accelerate-endpoint: false
public: true