Skip to content

Commit a996864

Browse files
committed
Revert "Remove workflow to build and deploy docs"
This reverts commit 812db6a.
1 parent 7ce83b5 commit a996864

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/deploy_mkdocs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish docs via GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
# Rebuild website when docs have changed or code has changed
9+
- 'README.md'
10+
- 'docs/**'
11+
- 'mkdocs.yml'
12+
- '**.py'
13+
14+
jobs:
15+
build:
16+
name: Deploy docs
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout master
21+
uses: actions/checkout@v3
22+
23+
- name: Set up Python 3.8
24+
uses: actions/setup-python@v3
25+
with:
26+
python-version: 3.8
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install -e \
32+
stac_fastapi/api \
33+
stac_fastapi/types \
34+
stac_fastapi/extensions \
35+
stac_fastapi/sqlalchemy
36+
python -m pip install mkdocs mkdocs-material pdocs
37+
38+
- name: update API docs
39+
run: |
40+
pdocs as_markdown \
41+
--output_dir docs/api/ \
42+
--exclude_source \
43+
--overwrite \
44+
stac_fastapi
45+
env:
46+
POSTGRES_USER: username
47+
POSTGRES_PASS: password
48+
POSTGRES_DBNAME: postgis
49+
POSTGRES_HOST: localhost
50+
POSTGRES_PORT: 5432
51+
POSTGRES_HOST_READER: localhost
52+
POSTGRES_HOST_WRITER: localhost
53+
54+
- name: Deploy docs
55+
run: mkdocs gh-deploy --force

0 commit comments

Comments
 (0)