AI Pop Publisher
This skill deploys compiled web player static assets (web/dist) to a public hosting endpoint and returns the live URL.
Supported Deployment Targets
The skill supports multi-tier hosting adapters:
- Tier 1 (Primary): Firebase Hosting (
target: "firebase")- Provides clean HTTPS URLs, CDN edge distribution, and single-command SPA routing.
- Tier 1 (Fallback / Direct GCS): GCS Static Website Bucket (
target: "gcs")- Direct sync to a public static-website-configured GCS bucket (
storage.googleapis.com/<bucket>/<slug>/index.html).
- Direct sync to a public static-website-configured GCS bucket (
- Tier 2 (Extensible): Third-Party Static Hosts (
target: "vercel" | "cloudflare" | "netlify")- CLI adapters for external static site hosting services.
Instructions
-
Verify Build Output:
- Confirm
web/dist/index.htmlexists and is non-empty. - Verify all bundled assets (
.js,.css,.mp3,.png) are present inweb/dist/assets/.
- Confirm
-
Resolve Deployment Strategy:
- Read target from request context or environment (
AIPOP_DEPLOY_TARGET). - Default strategy: Try Firebase Hosting first if
firebase.jsonorFIREBASE_TOKEN/service account key is available; otherwise fall back to GCS Static Website Bucket usingAIPOP_RESULTS_BUCKETorGENMEDIA_BUCKET.
- Read target from request context or environment (
-
Deploy - Strategy A: Firebase Hosting:
- Ensure
firebase.jsonexists inweb/or project root configured to pointpublictodist. - Run deployment command:
Terminal window firebase deploy --only hosting --non-interactive - Extract the published Hosting URL (e.g.
https://<site-id>.web.app).
- Ensure
-
Deploy - Strategy B: GCS Static Website Bucket:
- Derive a unique URL path slug using artist name and timestamp (e.g.
velvet-decibels-20260813). - Sync static assets to the public results bucket:
Terminal window gcloud storage rsync -r web/dist/ gs://<bucket_name>/<artist-slug>/ - Construct the public HTTPS web URL:
https://storage.googleapis.com/<bucket_name>/<artist-slug>/index.html.
- Derive a unique URL path slug using artist name and timestamp (e.g.
-
Liveness Verification:
- Issue a HTTP HEAD request to the published URL (
curl -s -I <URL>). - Confirm response status code is
200 OK.
- Issue a HTTP HEAD request to the published URL (
-
Return Deliverable:
- Output a structured JSON response and human-readable summary with the verified live URL.