2021-07-08 05:02:49 +00:00
|
|
|
name: Generate site to GitHub pages
|
2021-11-07 10:42:50 +00:00
|
|
|
on:
|
|
|
|
push:
|
2022-07-29 15:19:57 +00:00
|
|
|
branches:
|
|
|
|
- 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
|
2022-07-29 15:22:52 +00:00
|
|
|
run: |
|
2022-07-29 15:25:50 +00:00
|
|
|
nix-shell -p nodejs
|
2022-07-29 15:22:52 +00:00
|
|
|
mv notebook/ site/public/
|
|
|
|
cd site
|
|
|
|
npm install
|
|
|
|
npm run build
|
2021-07-08 05:02:49 +00:00
|
|
|
- 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 }}
|
|
|
|
|