Skip to content

Update IVP

Update IVP #77

name: Export Pluto notebooks & Deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: export
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: 🙌 Install Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.10"
- name: ⏱ Cache notebook states
uses: actions/cache@v4
with:
path: _cache
key: ${{ runner.os }}-pluto_state_cache-v3-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-pluto_state_cache-v3-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }}
- name: ⏱ Cache .julia
uses: actions/cache@v4
with:
path: ~/.julia
key: ${{ runner.os }}-dotjulia-v1-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }}-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-dotjulia-v1-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }}
- name: 🪴 Generate site
run: |
julia --project=pluto-deployment-environment -e '
import Pkg
Pkg.instantiate()
import PlutoPages
PlutoPages.generate("."; html_report_path="generation_report.html")
cp("./netlify.toml", "./_site/netlify.toml")'
env:
JULIA_PKG_SERVER: ""
- name: 📰 Upload site generation report
uses: actions/upload-artifact@v4
if: always()
with:
path: generation_report.html
- name: 🚀 Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: _site