Skip to content

Commit d1a2e1a

Browse files
committed
First attempt at github pages action file
Signed-off-by: Charlie Street <me@charliestreet.net>
1 parent eea0725 commit d1a2e1a

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
name: Deploy
3+
# Deploy sphinx documentation to GitHub Pages in docs branch
4+
5+
on:
6+
# Triggers the workflow on push or pull request events but only for the "main" branch
7+
push:
8+
branches: [ "main" ]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
# Checkout the repository
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
# install the dependencies
18+
- name: Install dependencies
19+
run: pip install -r docs/requirements.txt
20+
# install doxygen
21+
- name: Install doxygen
22+
run: sudo apt install doxygen
23+
# build the documentation
24+
- name: Build documentation
25+
run: |
26+
cd docs
27+
make html
28+
# upload the documentation to GitHub Pages
29+
- name: Upload artifact
30+
uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: docs/build/html
33+
deploy:
34+
# Add a dependency to the build job
35+
needs: build
36+
37+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
38+
permissions:
39+
pages: write # to deploy to Pages
40+
id-token: write # to verify the deployment originates from an appropriate source
41+
42+
# Deploy to the github-pages environment
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
47+
runs-on: ubuntu-latest
48+
49+
steps:
50+
# deploy the documentation to GitHub Pages
51+
- name: Deploy to github pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4
54+

0 commit comments

Comments
 (0)