File tree 1 file changed +60
-0
lines changed
1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Website to GitHub Pages
2
+
3
+ on :
4
+ # Runs on pushes targeting the default branch
5
+ # push:
6
+ # branches: ["main"]
7
+
8
+ # Allows you to run this workflow manually from the Actions tab
9
+ workflow_dispatch :
10
+
11
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12
+ permissions :
13
+ pages : write
14
+ id-token : write
15
+
16
+ jobs :
17
+ # Build Website
18
+ build :
19
+ runs-on : ubuntu-latest
20
+ defaults :
21
+ run :
22
+ shell : bash -l {0}
23
+ steps :
24
+ - name : Checkout
25
+ uses : actions/checkout@v4
26
+
27
+ - name : Install Conda environment with Micromamba
28
+ uses : mamba-org/setup-micromamba@v1
29
+ with :
30
+ environment-file : website_figure/environment.yml
31
+ cache-environment : true
32
+
33
+ - name : Build Website
34
+ shell : bash -el {0}
35
+ run : |
36
+ cd website_figure
37
+ jupyter nbconvert myfigure.ipynb --execute --to html --output-dir=_build/html
38
+
39
+ - name : Upload artifact
40
+ uses : actions/upload-pages-artifact@v3
41
+ with :
42
+ path : website_figure/_build/html
43
+
44
+
45
+ # Publish Website to GitHub Pages if built successfully
46
+ deploy :
47
+ needs : build
48
+ if : github.ref == 'refs/heads/main'
49
+ runs-on : ubuntu-latest
50
+ environment :
51
+ name : github-pages
52
+ url : ${{ steps.deployment.outputs.page_url }}
53
+
54
+ steps :
55
+ - name : Setup Pages
56
+ uses : actions/configure-pages@v5
57
+
58
+ - name : Deploy to GitHub Pages
59
+ id : deployment
60
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments