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 }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading