fix(ci): simplify
This commit is contained in:
17
.github/workflows/deploy.yml
vendored
17
.github/workflows/deploy.yml
vendored
@@ -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:
|
||||
|
||||
9
makefile
9
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
|
||||
|
||||
Reference in New Issue
Block a user