Skip to content

Commit 68238e1

Browse files
authored
[Doc] Create a workflow to host docs using GitHub Pages. (#28)
* [Doc] Use sphinx to generate docs. * [Doc] Fix a bug on tlcpack_sphinx_addon. * [Doc] Fix linting issues. * [Doc] Create a workflow to host docs using GitHub Pages. * [Doc] Remove all deprecated docs.
1 parent 5f50e3a commit 68238e1

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/publish_docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: documentation
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
permissions:
6+
contents: write
7+
8+
jobs:
9+
docs:
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
working-directory: ./docs
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v5
17+
- name: Install dependencies
18+
run: |
19+
pip install -r requirements.txt
20+
- name: Sphinx build
21+
run: |
22+
make html
23+
- name: Deploy to GitHub Pages
24+
uses: peaceiris/actions-gh-pages@v3
25+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
26+
with:
27+
publish_branch: gh-pages
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: docs/_build/html
30+
force_orphan: true

0 commit comments

Comments
 (0)