diff --git a/.tangled/workflows/deploy.yml b/.tangled/workflows/deploy.yml index c72ffe7..fbdf012 100644 --- a/.tangled/workflows/deploy.yml +++ b/.tangled/workflows/deploy.yml @@ -5,10 +5,9 @@ engine: nixery dependencies: nixpkgs: - nodejs - - pnpm - gnumake steps: - name: deploy - command: make deploy + command: make ci-deploy env: CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} diff --git a/Makefile b/Makefile index 08105f5..eac3015 100644 --- a/Makefile +++ b/Makefile @@ -86,6 +86,18 @@ dist: web ## Assemble web-only files into dist/ for Cloudflare Pages deploy deploy: dist ## Build + deploy to Cloudflare Pages (requires wrangler auth) npx wrangler pages deploy $(DIST) --project-name npicomx --commit-dirty=true +.PHONY: ci-dist +ci-dist: ## Assemble dist/ from committed artifacts (no pico8/python3 required) + rm -rf $(DIST) + mkdir -p $(DIST) + cp index.html sw.js manifest.webmanifest crt.js npicomx.js og.png $(DIST)/ + cp -r favicons fonts vendor $(DIST)/ + @[ -f _headers ] && cp _headers $(DIST)/ || true + +.PHONY: ci-deploy +ci-deploy: ci-dist ## Deploy committed artifacts to Cloudflare Pages (CI-safe, no pico8 needed) + npx wrangler pages deploy $(DIST) --project-name npicomx --commit-dirty=true + # --- help / housekeeping ----------------------------------------------------- .PHONY: help help: ## Show this help