Update github workflow versions #131
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
name: funflow CI (Linux, Nix) | |
on: | |
- push | |
- pull_request | |
jobs: | |
build: | |
name: funflow [build >> tests >> doc] | |
runs-on: ubuntu-latest | |
steps: | |
# Setup | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v22 | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: funflow | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
- uses: actions/cache@v3 | |
name: Cache ~/.stack | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-stack | |
- name: Install dependencies | |
run: | | |
nix-shell --run "stack build --test --bench --no-run-tests --no-run-benchmarks --only-dependencies" | |
- name: Build | |
run: | | |
nix-shell --run "stack build --test --bench --no-run-tests --no-run-benchmarks" | |
- name: Test | |
run: | | |
nix-shell --run "stack test" | |
# Build documentation | |
- name: Build docs and tutorials | |
run: | | |
nix-shell --run "funflow-pages/scripts/build.sh" | |
# Deploy documentation to a Github page | |
- name: Deploy docs | |
# Push to GitHub Pages only on master | |
if: github.ref == 'refs/heads/master' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: ./funflow-pages/result/funflow |