fix(ci): temp fix

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-05-23 13:55:42 -03:00
parent 102697e514
commit 26cb8e17e8
2 changed files with 14 additions and 9 deletions

View File

@@ -11,15 +11,15 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main - name: Install Nix
- uses: DeterminateSystems/magic-nix-cache-action@main uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/flake-checker-action@main - name: Setup Nix Cache
- name: Setup go uses: DeterminateSystems/magic-nix-cache-action@main
uses: actions/setup-go@v5 - name: Check flake
- name: Generate templ files uses: DeterminateSystems/flake-checker-action@main
- name: Build project
run: | run: |
nix run github:a-h/templ -- generate nix shell nixpkgs#go github:a-h/templ --command 'make build-vercel'
ls pages
- name: Deploy - name: Deploy
uses: amondnet/vercel-action@v25 uses: amondnet/vercel-action@v25
with: with:

View File

@@ -37,7 +37,12 @@ bin/www: main.go templ
bin/vercel: cmd/vercel/main.go templ bin/vercel: cmd/vercel/main.go templ
go build -o ./bin/vercel ./cmd/vercel/main.go go build -o ./bin/vercel ./cmd/vercel/main.go
templ: # For some reason "templ generate" does not detect the files in CI, so this is a
# workaround.
TEMPL_FILES=$(patsubst %.templ, %_templ.go, $(wildcard **/*.templ))
templ: $(TEMPL_FILES)
@echo Generating templ files
%_templ.go: %.templ
templ generate templ generate
clean: clean: