forked from usnistgov/pfhub
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix broken local flake paths - local flake paths have issues on CIs. See NixOS/nix#3978 (comment). - fix mindless copy and paste
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
name: Test Jekyll | ||
on: [push, pull_request] | ||
jobs: | ||
pfhub-nix-test: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./ | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v20 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
name: pfhub | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
extraPullNames: nix-community | ||
- run: echo "UID=${UID}" >> $GITHUB_ENV | ||
- uses: actions/cache/restore@v3 | ||
with: | ||
path: /run/user/${{ env.UID }}/http_cache.sqlite | ||
key: ${{ runner.os}}-http_cache.sqlite | ||
# Following required because of | ||
# https://github.com/NixOS/nix/issues/3978#issuecomment-1585001299 | ||
- run: nix flake lock --update-input pfhub | ||
- run: nix develop --command bash -c "make simulations" | ||
- run: nix develop --command bash -c "find . -name '*.ipynb' -type f -not -path '*/.ipynb_checkpoints/*' -exec touch {} \;" | ||
- run: nix develop --command bash -c "make notebooks" | ||
- run: nix develop --command bash -c "rm -rf ./_site" | ||
- run: nix develop --command bash -c "jekyll build -d ./_site/pfhub" | ||
- uses: actions/cache/save@v3 | ||
if: always() | ||
with: | ||
path: /run/user/${{ env.UID }}/http_cache.sqlite | ||
key: ${{ runner.os}}-http_cache.sqlite |