Skip to content

Commit bf7aefd

Browse files
committed
[CI] Add GitHub Actions workflow for publishing documentation
1 parent be4753c commit bf7aefd

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/publish-docs.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.11'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
poetry install --with notebooks --with docs
26+
27+
- name: Build Documentation
28+
run: |
29+
make html_docs
30+
31+
- name: Deploy to GitHub Pages
32+
uses: peaceiris/actions-gh-pages@v3
33+
with:
34+
publish_branch: gh-pages
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: docs/build/html
37+
force_orphan: true

0 commit comments

Comments
 (0)