Skip to content

Commit 9956ceb

Browse files
Add doc publishing workflow (#18)
1 parent 4a4c3ce commit 9956ceb

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/publish_docs.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: publish-docs
2+
run-name: ${{ github.actor }} publish-docs
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
build_docs:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: '3.11'
15+
- name: Install hatch 🐣
16+
run: pip install hatch
17+
- name: Build docs 📚
18+
run: hatch run docs:build
19+
- name: Upload artifact
20+
uses: actions/upload-pages-artifact@v3.0.0
21+
with:
22+
path: docs/build
23+
24+
publish_docs:
25+
runs-on: ubuntu-latest
26+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
27+
permissions:
28+
pages: write # to deploy to Pages
29+
id-token: write # to verify the deployment originates from an appropriate source
30+
31+
# Deploy to the github-pages environment
32+
environment:
33+
name: github-pages
34+
url: ${{ steps.deployment.outputs.page_url }}
35+
36+
# Specify runner + deployment step
37+
steps:
38+
- name: Deploy to GitHub Pages
39+
id: deployment
40+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)