i cant belief i literally didnt even name the title of my talk correc… #59
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 | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ["preview/**"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v18 | |
with: | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- name: Cache pnpm store | |
uses: actions/cache@v3 | |
env: | |
cache-version: v1 # increment as needed to manually reset cache | |
with: | |
path: | | |
~/.pnpm-store/v3 | |
key: | |
${{ runner.os }}-${{ env.cache-version }}-${{ hashFiles('pnpm-lock.yaml') | |
}}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-version }}-${{ hashFiles('pnpm-lock.yaml') }}- | |
${{ runner.os }}-${{ env.cache-version }}- | |
- run: nix develop -c pnpm install --frozen-lockfile | |
- run: nix develop -c pnpm build | |
env: | |
URL: https://hazelweakly.me | |
ELEVENTY_ENV: prod | |
- run: | | |
cmd='' | |
if ${{ github.event_name == 'push' }}; then | |
cmd='--prod' | |
fi | |
nix develop -c netlify deploy $cmd | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |