File tree Expand file tree Collapse file tree 3 files changed +84
-29
lines changed Expand file tree Collapse file tree 3 files changed +84
-29
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : " Deploy a PR preview to the gh-pages branch"
2
+
3
+ on :
4
+ pull_request :
5
+ types :
6
+ - opened
7
+ - reopened
8
+ - synchronize
9
+ - closed
10
+ branches :
11
+ - ' main'
12
+
13
+ concurrency : preview-${{ github.ref }}
14
+
15
+ jobs :
16
+ deploy-pr-preview :
17
+ runs-on : ubuntu-latest
18
+ permissions :
19
+ contents : write
20
+ packages : write
21
+ pull-requests : write
22
+
23
+ steps :
24
+ - name : Checkout the PR version of the website repository
25
+ uses : actions/checkout@v4
26
+
27
+ - name : Setup the environment
28
+ if : github.event.action != 'closed' # Skip the build if the PR has been closed; just run the clean up steps
29
+ uses : mamba-org/setup-micromamba@v1
30
+ with :
31
+ environment-file : environment.yaml
32
+ init-shell : bash
33
+ cache-environment : true
34
+ post-cleanup : none
35
+
36
+ - name : Build the PR version of the website
37
+ if : github.event.action != 'closed' # Skip the build if the PR has been closed; just run the clean up steps
38
+ run : quarto render
39
+ shell : bash -el {0} # Required to see the mamba init env
40
+
41
+ - name : Deploy preview
42
+ uses : rossjrw/pr-preview-action@v1
43
+ with :
44
+ source-dir : ./_site/
Original file line number Diff line number Diff line change
1
+ name : " Render and Publish"
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ workflow_dispatch :
8
+
9
+ # you need these permissions to publish to GitHub pages
10
+ permissions :
11
+ contents : write
12
+ pages : write
13
+
14
+ jobs :
15
+ build-deploy :
16
+ runs-on : ubuntu-latest
17
+
18
+ steps :
19
+ - uses : actions/checkout@v4 # Checkout the repo to find files, such as the env
20
+
21
+ - name : Setup the environment
22
+ uses : mamba-org/setup-micromamba@v1
23
+ with :
24
+ environment-file : environment.yaml
25
+ init-shell : bash
26
+ cache-environment : true
27
+ post-cleanup : none
28
+
29
+ - name : Build the website
30
+ run : quarto render
31
+ shell : bash -el {0} # Required to see the mamba init env
32
+
33
+ # Push the website to the gh-pages branch
34
+ - name : Push the PR version of the website to gh-pages branch
35
+ uses : peaceiris/actions-gh-pages@v4
36
+ with :
37
+ github_token : ${{ secrets.GITHUB_TOKEN }}
38
+ publish_dir : ./_site
39
+ keep_files : true
40
+ destination_dir : .
You can’t perform that action at this time.
0 commit comments