Skip to content

Commit 901b352

Browse files
committed
Update deploy workflow to build and deploy sphinx website.
1 parent bb2ec97 commit 901b352

1 file changed

Lines changed: 35 additions & 35 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
# Simple workflow for deploying static content to GitHub Pages
2-
name: Deploy static content to Pages
1+
name: Deploy website
32

4-
on:
5-
# Runs on pushes targeting the default branch
6-
push:
7-
branches: ["main"]
3+
on: [push, pull_request]
84

9-
# Allows you to run this workflow manually from the Actions tab
10-
workflow_dispatch:
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
118

12-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
139
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
17-
18-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20-
concurrency:
21-
group: "pages"
22-
cancel-in-progress: false
10+
contents: write
2311

2412
jobs:
25-
# Single deploy job since we're just deploying
26-
deploy:
27-
environment:
28-
name: github-pages
29-
url: ${{ steps.deployment.outputs.page_url }}
13+
build:
3014
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
python-version: ["3.11"]
18+
3119
steps:
32-
- name: Checkout
33-
uses: actions/checkout@v4
34-
- name: Setup Pages
35-
uses: actions/configure-pages@v5
36-
- name: Upload artifact
37-
uses: actions/upload-pages-artifact@v3
38-
with:
39-
# Upload entire repository
40-
path: '.'
41-
- name: Deploy to GitHub Pages
42-
id: deployment
43-
uses: actions/deploy-pages@v4
20+
- name: Checkout repo
21+
uses: actions/checkout@v1
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install -r requirements.txt
30+
- name: Build site
31+
run: |
32+
cd docs
33+
make html
34+
- name: Upload docs
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: docs
38+
path: docs/build/html
39+
- name: Publish docs to Github Pages
40+
if: startsWith(github.event.ref, 'refs/tags')
41+
uses: JamesIves/github-pages-deploy-action@releases/v4
42+
with:
43+
folder: build/html

0 commit comments

Comments
 (0)