Skip to content

Commit 8efc255

Browse files
committed
add workflow
1 parent 82ac579 commit 8efc255

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Ingest PostGIS Docs
2+
run-name: Ingest PostGIS ${{ inputs.version }} Docs
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: "PostGIS version to ingest (e.g. 3.3, 3.4, 3.5)"
9+
required: true
10+
default: "3.6"
11+
12+
jobs:
13+
ingest-dev:
14+
name: Ingest PostGIS docs for Dev
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: ingest
19+
env:
20+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
21+
PGHOST: ${{ secrets.PGHOST }}
22+
PGPORT: ${{ secrets.PGPORT }}
23+
PGDATABASE: ${{ secrets.PGDATABASE }}
24+
PGUSER: ${{ secrets.PGUSER }}
25+
PGPASSWORD: ${{ secrets.PGPASSWORD }}
26+
steps: &ingest-steps
27+
- name: Checkout repository
28+
uses: actions/checkout@v5
29+
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version-file: ./ingest/.python-version
34+
35+
- name: Install uv
36+
uses: astral-sh/setup-uv@v6
37+
38+
- name: Install python dependencies
39+
run: uv sync
40+
41+
- name: Ingest PostGIS ${{ github.event.inputs.version }} docs for dev
42+
run: uv run python postgis_docs.py --version ${{ github.event.inputs.version }}
43+
env:
44+
PYTHONPATH: ..
45+
46+
ingest-prod:
47+
name: Ingest PostGIS docs for Prod
48+
runs-on: ubuntu-latest
49+
defaults:
50+
run:
51+
working-directory: ingest
52+
env:
53+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
54+
PGHOST: ${{ secrets.PROD_PGHOST }}
55+
PGPORT: ${{ secrets.PROD_PGPORT }}
56+
PGDATABASE: ${{ secrets.PROD_PGDATABASE }}
57+
PGUSER: ${{ secrets.PROD_PGUSER }}
58+
PGPASSWORD: ${{ secrets.PROD_PGPASSWORD }}
59+
steps: *ingest-steps

.github/workflows/ingest-postgres-docs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
4646
- name: Ingest PostgreSQL ${{ github.event.inputs.version }} docs for dev
4747
run: uv run python postgres_docs.py ${{ github.event.inputs.version }}
48+
env:
49+
PYTHONPATH: ..
4850

4951
ingest-prod:
5052
name: Ingest PostgreSQL docs for Prod

.github/workflows/ingest-tiger-docs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636

3737
- name: Ingest Tiger docs
3838
run: uv run python tiger_docs.py
39+
env:
40+
PYTHONPATH: ..
3941

4042
ingest-prod:
4143
name: Ingest Tiger docs for Prod

0 commit comments

Comments
 (0)