Skip to content

Commit f7b1cb4

Browse files
committed
ci: add deploy.yaml workflow for deploying docs to GitHub Pages
1 parent 7a5902b commit f7b1cb4

File tree

2 files changed

+43
-5
lines changed

2 files changed

+43
-5
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,16 @@ jobs:
9999
docs:
100100
runs-on: ubuntu-latest
101101
steps:
102-
- name: Checkout repository
102+
- name: Checkout
103103
uses: actions/checkout@v3.5.3
104104

105-
- name: Install dependencies
105+
- name: Install requirements
106106
run: pip3 install -r docs/requirements.txt
107107

108-
- name: Build documentation
108+
- name: Build with Sphinx
109109
run: sphinx-build -b html docs build/docs -W --keep-going
110110

111-
- name: Upload documentation as artifact
111+
- name: Upload artifact
112112
uses: actions/upload-artifact@v3.1.2
113113
with:
114-
name: docs
115114
path: build/docs

.github/workflows/deploy.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: deploy
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches: [use-github-page]
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
concurrency:
11+
group: pages
12+
cancel-in-progress: false
13+
jobs:
14+
docs:
15+
runs-on: ubuntu-latest
16+
environment:
17+
name: github-pages
18+
url: ${{ steps.deployment.outputs.page_url }}
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3.5.3
22+
23+
- name: Install requirements
24+
run: pip3 install -r docs/requirements.txt
25+
26+
- name: Setup Pages
27+
uses: actions/configure-pages@v3.0.6
28+
29+
- name: Build with Sphinx
30+
run: sphinx-build -b html docs docs/build -W --keep-going
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v1.0.8
34+
with:
35+
path: docs/build
36+
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v2.0.2

0 commit comments

Comments
 (0)