Skip to content

Commit 72cdad3

Browse files
committed
myfigure
1 parent 0715848 commit 72cdad3

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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

0 commit comments

Comments
 (0)