#! /usr/bin/env nix-shell
#! nix-shell -i "just --justfile"

default:
	@just --list --justfile {{ justfile() }} --unsorted

clean:
	rm -r website

check-licenses:
	nix run nixpkgs#go-licenses check ./...

check-links:
	hyperlink website/public

update-all:
	npin update
	go get -u all
	gomod2nix --outdir nix

build:
	go run ./cmd/build

dev:
	systemfd -s http::3000 -- modd

deploy-vercel-preview: clean build
	vercel pull --environment=preview
	vercel deploy

deploy-vercel: clean build check-links
	vercel pull --environment=production
	vercel deploy --prod

deploy-netlify-preview: clean build
	netlify deploy

deploy-netlify: clean build check-links
	netlify deploy --prodIfUnlocked

deploy-production: deploy-vercel deploy-netlify