-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.17 KB
/
build.yml
File metadata and controls
38 lines (36 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Build
on:
push:
branches: [main]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v20
with:
source-url: "${{ format('https://install.lix.systems/lix/lix-installer-{0}', 'x86_64-linux') }}"
diagnostic-endpoint: ""
backtrace: "true"
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: nix develop -c bash -c "echo \$PATH" | tr ':' '\n' | grep '^/nix/store' >> "$GITHUB_PATH"
- name: Cache pnpm store
uses: actions/setup-node@v4
with:
cache: pnpm
- 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 --cwd . --filter "hazelweakly.me" --dir=public $cmd
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}