2021-07-08 05:02:49 +00:00
|
|
|
name: Generate site to GitHub pages
|
2021-11-07 10:42:50 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
- master
|
2021-07-08 05:02:49 +00:00
|
|
|
jobs:
|
|
|
|
generate-site:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: cachix/install-nix-action@v13
|
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
2021-07-21 08:28:07 +00:00
|
|
|
- name: Setup for static site generation
|
|
|
|
uses: workflow/nix-shell-action@v1
|
2021-07-08 05:02:49 +00:00
|
|
|
with:
|
|
|
|
packages: nodejs,coreutils
|
|
|
|
script: |
|
2021-11-07 10:42:50 +00:00
|
|
|
mv notebook/ site/public/
|
2021-07-08 05:02:49 +00:00
|
|
|
cd site
|
|
|
|
npm install
|
|
|
|
npm run build
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
if: success()
|
|
|
|
uses: crazy-max/ghaction-github-pages@v2
|
|
|
|
with:
|
|
|
|
jekyll: false
|
|
|
|
target_branch: gh-pages
|
|
|
|
build_dir: site/out
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.PAGES_TOKEN }}
|
|
|
|
|