-
Notifications
You must be signed in to change notification settings - Fork 364
106 lines (93 loc) · 2.37 KB
/
deploy-docs.yml
File metadata and controls
106 lines (93 loc) · 2.37 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
name: Deploy Documentation
on:
pull_request:
branches:
- dev
push:
branches:
- dev
- main
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping" --health-timeout "5s" --health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libffi-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
gettext \
libfreetype-dev \
libjpeg-dev \
libpq-dev \
libenchant-2-dev \
enchant-2 \
hunspell \
aspell-en \
build-essential
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: latest
enable-cache: true
- name: Install Python dependencies
run: uv sync --group docs
working-directory: ./app
- name: Build documentation
working-directory: ./doc
run: |
../app/.venv/bin/sphinx-build -b html -d _build/doctrees . _build/html
- name: Prepare deployment
if: github.event_name == 'push'
run: |
mkdir -p _site
cp -r doc/_build/html/* _site/
cp doc/CNAME _site/
touch _site/.nojekyll
ls -la _site/
- name: Setup Pages
if: github.event_name == 'push'
uses: actions/configure-pages@v4
- name: Upload artifact
if: github.event_name == 'push'
uses: actions/upload-pages-artifact@v4
with:
path: '_site'
deploy:
if: github.event_name == 'push'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4