This repository has been archived by the owner on May 28, 2024. It is now read-only.
Remove dependency on immer
#12
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: Build and deploy | |
on: | |
push: | |
pull_request: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Update npm dep hash | |
run: | | |
# Only recompute the hash if the lock changed | |
git diff --quiet --cached package-lock.json \ | |
|| nix run .#compute-npm-dep-hash | |
- name: Commit and push npm-dep-hash | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
# Only commit if the dep hash changed | |
git diff --quiet --cached npm-deps-hash \ | |
|| git commit -m "Update npm dep hash [skip ci]" | |
git push | |
- name: Build project | |
run: nix build .#doffycup-github-pages | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ./result/www | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |