From a0ce6903e86a2889a448092d8171f267eaf3698a Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L. de Mello" Date: Thu, 23 May 2024 14:41:00 -0300 Subject: [PATCH] fix(ci): simplify --- .github/workflows/deploy.yml | 17 +++++++---------- makefile | 9 ++------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 08e5dc5..f820080 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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: diff --git a/makefile b/makefile index c1ad385..ea2a6f1 100644 --- a/makefile +++ b/makefile @@ -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