Skip to content

Commit fb02176

Browse files
add workflow to deploy site to GitHub Pages
1 parent b3c3f98 commit fb02176

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
# branches: ["main"] TODO: Uncomment this line to restrict the action to the main branch
6+
workflow_dispatch:
7+
8+
jobs:
9+
# BUILD
10+
build:
11+
name: Build Site
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Setup Pages
17+
uses: actions/configure-pages@v5
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.13'
21+
- run: pip install sphinx sphinx_rtd_theme
22+
- run: make html
23+
- name: Upload artifact
24+
uses: actions/upload-pages-artifact@v3
25+
with:
26+
path: 'build/html'
27+
28+
# DEPLOY
29+
deploy:
30+
name: Deploy to GitHub Pages
31+
runs-on: ubuntu-latest
32+
needs: [build]
33+
permissions: # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
34+
pages: write # to deploy to Pages
35+
id-token: write # to verify the deployment originates from an appropriate source
36+
steps:
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
40+
environment: # Deploy to the github-pages environment
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)