Skip to content

Commit e3bd85f

Browse files
committed
add gh workflow
1 parent 5554530 commit e3bd85f

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/deploy_mkdocs.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish docs via GitHub Pages
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
# Rebuild website when docs have changed or code has changed
9+
- "README.md"
10+
- "docs/**"
11+
- "**.py"
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
name: Deploy docs
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout main
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python 3.8
24+
uses: actions/setup-python@v5
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 \
32+
stac_fastapi/core \
33+
stac_fastapi/elasticsearch[docs] \
34+
stac_fastapi/opensearch \
35+
36+
- name: update API docs
37+
run: |
38+
pdocs as_markdown \
39+
--output_dir docs/src/api/ \
40+
--exclude_source \
41+
--overwrite \
42+
stac_fastapi
43+
env:
44+
APP_HOST: 0.0.0.0
45+
APP_PORT: 8082
46+
ES_HOST: opensearch
47+
ES_PORT: 9202
48+
ES_USE_SSL: false
49+
ES_VERIFY_CERTS: false
50+
BACKEND: opensearch
51+
52+
- name: Deploy docs
53+
run: mkdocs gh-deploy --force -f docs/mkdocs.yml

0 commit comments

Comments
 (0)