-
Notifications
You must be signed in to change notification settings - Fork 55
38 lines (31 loc) · 926 Bytes
/
docs.yml
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
name: Deploy documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Build and push docs
run: |
git config user.name Packit
git config user.email [email protected]
python3 -m pip install --upgrade pip
python3 -m pip install setuptools
python3 -m pip install .
python3 -m pip install pdoc3 pygments
python3 -m pdoc --html -o built_docs ogr
mv built_docs/ogr docs
touch .nojekyll
COMMIT_SHA=$(git log -1 --format=%h)
git checkout --orphan gh-pages
git rm --cached '*'
git add docs .nojekyll
git commit -m "Update docs for $COMMIT_SHA"
git push --force origin gh-pages
shell: bash