Skip to content

Commit ac2c0dc

Browse files
committed
Add an action to export notebooks to GitHub pages
1 parent c0be827 commit ac2c0dc

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/ExportPluto.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Adapted from https://github.com/JuliaPluto/static-export-template
2+
name: Export Pluto notebooks to GitHub pages
3+
4+
on:
5+
push:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: pluto-export
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
build-and-deploy:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout this repository
21+
uses: actions/checkout@v4
22+
23+
- name: Install Julia
24+
uses: julia-actions/setup-julia@v2
25+
26+
- name: Cache Julia depot
27+
uses: julia-actions/cache@v2
28+
29+
- name: Set up notebook state cache
30+
uses: actions/cache@v4
31+
with:
32+
path: cache
33+
key: ${{ runner.os }}-pluto_state_cache-v2-${{ hashFiles('**/Project.toml', '**/Manifest.toml', '.github/workflows/*' ) }}-${{ hashFiles('**/*jl') }}
34+
restore-keys: |
35+
${{ runner.os }}-pluto_state_cache-v2-${{ hashFiles('**/Project.toml', '**/Manifest.toml', '.github/workflows/*' ) }}
36+
37+
- name: Export Pluto notebooks to HTML
38+
run: make build
39+
40+
- name: Deploy to gh-pages
41+
uses: JamesIves/github-pages-deploy-action@v4
42+
with:
43+
folder: build
44+
single-commit: true

0 commit comments

Comments
 (0)