5
5
push :
6
6
branches :
7
7
- master
8
+ pull_request :
8
9
9
10
# When two jobs run in parallel, cancel the older ones, to make sure that the
10
11
# website is generated from the most recent commit.
11
12
concurrency :
12
- group : pluto-export
13
+ group : pluto-export-${{ github.ref }}
13
14
cancel-in-progress : true
14
15
15
16
# This action needs permission to write the exported HTML file to the gh-pages branch.
@@ -30,16 +31,18 @@ jobs:
30
31
version : " 1" # This will automatically pick the latest Julia version
31
32
32
33
- name : Cache Julia artifacts & such
33
- uses : julia-actions/cache@v1
34
+ uses : julia-actions/cache@v2
34
35
with :
35
- cache-registries : " true"
36
+ # Contains the node env for PlutoPDF.
37
+ # Disable so it installs Chromium every time.
38
+ cache-scratchspaces : false
36
39
37
40
# We set up a folder that Pluto can use to cache exported
38
41
# notebooks. If the notebook file did not change, then Pluto can
39
42
# take the exported file from cache instead of running the
40
43
# notebook.
41
44
- name : Set up notebook state cache
42
- uses : actions/cache@v3
45
+ uses : actions/cache@v4
43
46
with :
44
47
path : pluto_state_cache
45
48
key : ${{ runner.os }}-pluto_state_cache-v2-${{ hashFiles('**/Project.toml', '**/Manifest.toml', '.github/workflows/*' ) }}-${{ hashFiles('**/*jl') }}
74
77
end
75
78
'
76
79
77
-
78
80
- name : Deploy to gh-pages
81
+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
79
82
uses : JamesIves/github-pages-deploy-action@releases/v4
80
83
with :
81
84
token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments