Skip to content

Commit 66bfe35

Browse files
committed
Add github action for publishing docs
1 parent d97a8dc commit 66bfe35

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build docs
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
name: Build Docs
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@master
12+
- name: Build docs
13+
uses: actions/setup-python@master
14+
with:
15+
python-version: "3.12"
16+
- run: |
17+
make install
18+
cd docs
19+
make install-deps
20+
make build
21+
tar -C build/html/ --dereference --hard-dereference -cvzf $RUNNER_TEMP/github-pages.tar.gz .
22+
- name: Upload static files as artifact
23+
# We only execute this step if the commit is tagged, i.e., this is a release
24+
#if: startsWith(github.ref, 'refs/tags')
25+
id: deployment
26+
uses: actions/upload-pages-artifact@v3
27+
with:
28+
path: ${{ runner.temp }}/github-pages.tar.gz
29+
30+
deploy:
31+
name: Deploy docs
32+
needs: build
33+
runs-on: ubuntu-latest
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
steps:
38+
- name: Deploy to GitHub Pages
39+
# We only execute this step if the commit is tagged, i.e., this is a release
40+
#if: startsWith(github.ref, 'refs/tags')
41+
id: deployment
42+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)