From 15d7f37742af792684e60076de00b363ed61c7b6 Mon Sep 17 00:00:00 2001 From: "elliot.fouchy" Date: Sat, 31 Oct 2026 00:25:12 +0100 Subject: [PATCH] ci: use the shared verified Sites deployment --- .../deploy-pollinations-production.yml | 35 ++++--------------- README.md | 2 ++ 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/.github/workflows/deploy-pollinations-production.yml b/.github/workflows/deploy-pollinations-production.yml index dba94bb..5ab323b 100644 --- a/.github/workflows/deploy-pollinations-production.yml +++ b/.github/workflows/deploy-pollinations-production.yml @@ -8,34 +8,11 @@ on: permissions: contents: read -concurrency: - group: websim-production - cancel-in-progress: false - jobs: deploy: - if: github.ref == 'refs/heads/production' && (github.event_name == 'workflow_dispatch' || vars.AUTO_DEPLOY == 'true') - runs-on: ubuntu-latest - environment: production - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 - with: - node-version: "24" - cache: npm - - run: npm ci - - run: npm run typecheck - - run: npm test - - name: Publish Websim - env: - POLLINATIONS_API_KEY: ${{ secrets.POLLINATIONS_API_KEY }} - run: npm run deploy - - name: Verify deployed files - run: | - set -euo pipefail - for file in dist/index.html dist/assets/*; do - curl --fail --location --silent --show-error --retry 5 --retry-all-errors \ - --retry-delay 5 --max-time 30 \ - "https://websim.pollinations.app/${file#dist/}" --output /tmp/websim-asset - cmp "$file" /tmp/websim-asset - done + if: github.event_name == 'workflow_dispatch' || vars.AUTO_DEPLOY == 'true' + uses: pollinations/pollinations/.github/workflows/deploy-pollinations-site.yml@154eec6262d09d1c034c1984caa4503fd3baca75 + with: + site-name: websim + secrets: + POLLINATIONS_API_KEY: ${{ secrets.POLLINATIONS_API_KEY }} diff --git a/README.md b/README.md index 38a5d2e..27f48d5 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,8 @@ Actions, with repository variable `AUTO_DEPLOY=true` and environment secret `POLLINATIONS_API_KEY`. Promote `main` to `production` through a PR. Never put the deployment key in Vite/browser config. +CI calls the [shared Sites workflow](https://github.com/pollinations/pollinations/blob/154eec6262d09d1c034c1984caa4503fd3baca75/.github/workflows/deploy-pollinations-site.yml), pinned to a reviewed commit. It builds and tests without the deployment key, then publishes and verifies every file on a separate runner using the published CLI. Reverting the workflow change restores the previous deployment procedure. + `websim.pollinations.app` is served by Sites. `websim.pollinations.ai` redirects there with HTTP 301, preserving paths and query strings. Login, generation, downloads and deployed assets have been verified. The old Worker is retained