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 65b7460..8917e7e 100644 --- a/Makefile +++ b/Makefile @@ -135,6 +135,20 @@ dist: build ## 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 picosky --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 og.png $(DIST)/ + cp picosky.js picosky-demo.js picosky-comms.js picosky-firehose.js picosky-shim.js $(DIST)/ + cp client-metadata.json $(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 picosky --commit-dirty=true + # --- setup / housekeeping ---------------------------------------------------- .PHONY: install-pico8 install-pico8: ## Install PICO-8 from /tmp/pico8.zip (override ZIP=)