Skip to content

Commit b4767af

Browse files
Technici4nmfherbst
andauthored
Add basic CI (#13)
Co-authored-by: Michael F. Herbst <[email protected]>
1 parent 2594380 commit b4767af

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/ExportPluto.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ on:
55
push:
66
branches:
77
- master
8+
pull_request:
89

910
# When two jobs run in parallel, cancel the older ones, to make sure that the
1011
# website is generated from the most recent commit.
1112
concurrency:
12-
group: pluto-export
13+
group: pluto-export-${{ github.ref }}
1314
cancel-in-progress: true
1415

1516
# This action needs permission to write the exported HTML file to the gh-pages branch.
@@ -30,16 +31,18 @@ jobs:
3031
version: "1" # This will automatically pick the latest Julia version
3132

3233
- name: Cache Julia artifacts & such
33-
uses: julia-actions/cache@v1
34+
uses: julia-actions/cache@v2
3435
with:
35-
cache-registries: "true"
36+
# Contains the node env for PlutoPDF.
37+
# Disable so it installs Chromium every time.
38+
cache-scratchspaces: false
3639

3740
# We set up a folder that Pluto can use to cache exported
3841
# notebooks. If the notebook file did not change, then Pluto can
3942
# take the exported file from cache instead of running the
4043
# notebook.
4144
- name: Set up notebook state cache
42-
uses: actions/cache@v3
45+
uses: actions/cache@v4
4346
with:
4447
path: pluto_state_cache
4548
key: ${{ runner.os }}-pluto_state_cache-v2-${{ hashFiles('**/Project.toml', '**/Manifest.toml', '.github/workflows/*' ) }}-${{ hashFiles('**/*jl') }}
@@ -74,8 +77,8 @@ jobs:
7477
end
7578
'
7679
77-
7880
- name: Deploy to gh-pages
81+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
7982
uses: JamesIves/github-pages-deploy-action@releases/v4
8083
with:
8184
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)