-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (64 loc) · 1.89 KB
/
docs.yml
File metadata and controls
78 lines (64 loc) · 1.89 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
name: Docs
on:
push:
branches: [master]
paths:
- "docs/**"
- "mkdocs.yml"
- "requirements-docs.txt"
- "config/api.py"
- "config/api_schemas.py"
- "libraries/api.py"
- "libraries/api_schemas.py"
- "users/api.py"
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
services:
db:
image: postgis/postgis:17-3.5
env:
POSTGRES_DB: book_corners
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgis://postgres:postgres@localhost:5432/book_corners
DJANGO_SECRET_KEY: ci-docs-key
DJANGO_DEBUG: "false"
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Install GIS dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends gdal-bin libgdal-dev libgeos-dev libproj-dev
sudo rm -rf /var/lib/apt/lists/*
- name: Install Python packages
run: uv pip install --system -r requirements.txt -r requirements-docs.txt
- name: Run migrations
run: python manage.py migrate
- name: Generate OpenAPI schema
run: python manage.py export_openapi_schema > docs/openapi.json
- name: Build docs
run: zensical build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
cname: developers.bookcorners.org