Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 6 additions & 29 deletions .github/workflows/deploy-pollinations-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,18 @@ Use the published CLI included in this repository (`npm run deploy` does both).
The owning account is `polli@pollinations.ai`; Sites requires `account:machines`.
No Cloudflare credential is needed by the app's final deployment workflow.

**Deploy / Pollinations production** runs from `production` in GitHub Actions,
using its environment secret `POLLINATIONS_API_KEY`. Keep `AUTO_DEPLOY` unset until
cutover is verified; then enable it for pushes to `production`. Promote `main`
to `production` through a PR. Never put the deployment key in Vite/browser config.

The Sites cutover is still pending. Preserve the current Worker until the Site,
login callback, generation, prompt links and assets are verified. The exact
Cloudflare route currently serving `websim.pollinations.app/*` must be handed
back to Sites, and `.ai` should redirect with paths/query strings preserved.
Check remaining raw API clients before retiring the old Worker. Rollback restores
the old route and disables the Sites workflow; retain the old Worker for this.
**Deploy / Pollinations production** runs on pushes to `production` in GitHub
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
for rollback and a remaining raw API client audit. Rollback disables the redirect
and Sites workflow and restores the `.app` route to the old Worker.

## Catalog submission

Expand Down
Loading