fix(ci): simplify

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-05-23 14:41:00 -03:00
parent 2e28d5e4c9
commit a0ce6903e8
2 changed files with 9 additions and 17 deletions

View File

@@ -11,17 +11,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Setup Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check flake
uses: DeterminateSystems/flake-checker-action@main
- name: Build project
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
- name: Build
run: |
nix shell nixpkgs#go nixpkgs#gnumake github:a-h/templ
templ --help
go list
go install github.com/a-h/templ/cmd/templ@latest
make build-vercel
- name: Deploy
uses: amondnet/vercel-action@v25
with:

View File

@@ -37,13 +37,8 @@ bin/www: main.go templ
bin/vercel: cmd/vercel/main.go templ
go build -o ./bin/vercel ./cmd/vercel/main.go
# 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 -f $^
templ:
templ generate
clean:
if [[ -d "dist" ]]; then rm -r ./dist; fi