Skip to content

Commit bb167e3

Browse files
committed
use gh-pages actions for publishing docs
1 parent 2462402 commit bb167e3

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

.github/workflows/build-docs.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,33 @@ on:
88
jobs:
99
build-docs:
1010
runs-on: ubuntu-latest
11-
container:
12-
image: python:3.10
1311
steps:
1412
- name: Checkout
1513
uses: actions/checkout@v4
16-
- name: Build and deploy docs
14+
- name: Setup python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.10"
18+
cache: 'pip'
19+
- name: Build docs
1720
run: |
18-
python3.10 -m venv venv/
19-
venv/bin/python -m pip install --upgrade pip
20-
venv/bin/pip install -r .script/requirements.txt
21-
venv/bin/python3 .script/generate_docs.py \
21+
python -m pip install --upgrade pip
22+
python -m pip install -r .script/requirements.txt
23+
python .script/generate_docs.py \
2224
--output_dir=generated_docs/
23-
cd generated_docs/
24-
PATH="../venv/bin:$PATH" mkdocs gh-deploy \
25-
-m "[ci skip] Deployed {sha} with MkDocs version: {version}"
25+
- name: Upload docs artifacts
26+
uses: actions/upload-pages-artifact@v3
27+
with:
28+
path: generated_docs/
29+
30+
deploy-docs:
31+
runs-on: ubuntu-latest
32+
needs: build-docs
33+
permissions:
34+
pages: write
35+
id-token: write
36+
environment:
37+
name: github-pages
38+
steps:
39+
- name: Deploy docs
40+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)