File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Github Pages
22
33on :
4- push :
5- branches :
6- - " **"
4+ pull_request :
5+ branches : ["main"]
76
8- # Allows you to run this workflow manually from the Actions tab
7+ # Allows you to run this workflow manually from the Actions tab
98 workflow_dispatch :
10-
11- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12- permissions :
13- contents : read
14- pages : write
15- id-token : write
16-
17- # Allow one concurrent deployment
18- concurrency :
19- group : " pages"
20- cancel-in-progress : true
21-
9+ workflow_call :
2210
2311jobs :
2412 build :
25- runs-on : ubuntu-22.04
13+ runs-on : ubuntu-latest
2614 env :
2715 # Directory that will be published on github pages
2816 PUBLISH_DIR : ./_build/html
@@ -40,29 +28,10 @@ jobs:
4028
4129 - name : Build docs
4230 run : jupyter book build .
43-
44- - name : Upload artifact
45- uses : actions/upload-pages- artifact@v1
31+
32+ - name : Upload documentation as artifact
33+ uses : actions/upload-artifact@v3
4634 with :
35+ name : documentation
4736 path : ${{ env.PUBLISH_DIR }}
48-
49-
50- # Single deploy job since we're just deploying
51- deploy :
52- if : github.ref == 'refs/heads/main'
53- needs : build
54- environment :
55- name : github-pages
56- url : ${{ steps.deployment.outputs.page_url }}
57-
58- runs-on : ubuntu-latest
59- steps :
60- - name : Checkout
61- uses : actions/checkout@v3
62-
63- - name : Setup Pages
64- uses : actions/configure-pages@v2
65-
66- - name : Deploy to GitHub Pages
67- id : deployment
68- uses : actions/deploy-pages@v1
37+ if-no-files-found : error
Original file line number Diff line number Diff line change 1+ name : Deploy to Github pages
2+
3+ on :
4+ push :
5+ branches : [main]
6+
7+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
8+ permissions :
9+ contents : read
10+ pages : write
11+ id-token : write
12+
13+ # Allow one concurrent deployment
14+ concurrency :
15+ group : " pages"
16+ cancel-in-progress : true
17+
18+ jobs :
19+
20+
21+ # Build documentation/website. Will be downloaded in first step
22+ build-docs :
23+ uses : ./.github/workflows/build_docs.yml
24+
25+ deploy :
26+ needs : [build-docs]
27+
28+ environment :
29+ name : github-pages
30+ url : ${{ steps.deployment.outputs.page_url }}
31+
32+ runs-on : ubuntu-latest
33+ steps :
34+ - name : Download docs artifact
35+ # docs artifact is uploaded by build-docs job
36+ uses : actions/download-artifact@v3
37+ with :
38+ name : documentation
39+ path : " ./public"
40+
41+ - name : Upload artifact
42+ uses : actions/upload-pages-artifact@v1
43+ with :
44+ path : " ./public"
45+
46+ - name : Checkout repository
47+ uses : actions/checkout@v3
48+
49+ - name : Setup Pages
50+ uses : actions/configure-pages@v3
51+
52+ - name : Deploy to GitHub Pages
53+ id : deployment
54+ uses : actions/deploy-pages@v2
Original file line number Diff line number Diff line change @@ -42,12 +42,12 @@ jobs:
4242
4343 - name : Extract metadata (tags, labels) for Docker
4444 id : meta
45- uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
45+ uses : docker/metadata-action@v4
4646 with :
4747 images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4848
4949 - name : Build and push Docker image
50- uses : docker/build-push-action@v3
50+ uses : docker/build-push-action@v4
5151 with :
5252 context : .
5353 push : true
Original file line number Diff line number Diff line change 3333sphinx :
3434 config :
3535 bibtex_bibfiles : ["docs/refs.bib"]
36+ html_last_updated_fmt : " %b %d, %Y"
3637
3738 extra_extensions :
3839 - ' sphinx.ext.autodoc'
You can’t perform that action at this time.
0 commit comments