Environments and Variables
This page lists the GitHub Environments and the secrets/vars used by the pipelines and manual workflows.
Environments and site mapping
| Environment | Site URL | Primary workflows |
|---|---|---|
| mainnet | https://ritoswap.com | DApp pipeline, Manual deploy mainnet |
| testnet | https://testnet.ritoswap.com | DApp pipeline, Manual deploy testnet, Manual smoke tests |
| docs | https://docs.ritoswap.com | Docs and Storybook pipeline, Manual deploy docs |
| storybook | https://ui.ritoswap.com | Docs and Storybook pipeline, Manual deploy storybook |
Secrets and vars are environment-scoped. The names stay the same across environments, but values
(like VERCEL_PROJECT_ID) differ per environment.
Mirror dispatch environment
| Environment | Repo | Purpose |
|---|---|---|
| ci-dispatch | ritovision/ritoswap-mirror | Stores the PAT used to trigger private pipelines |
Secrets (GitHub)
| Secret | Used for |
|---|---|
| VERCEL_TOKEN | All Vercel deploys and rollbacks |
| VERCEL_ORG_ID | All Vercel deploys and rollbacks |
| VERCEL_PROJECT_ID | All Vercel deploys and rollbacks |
| PRIVATE_KEY_PLAYWRIGHT | Playwright smoke tests |
| PRIVATE_KEY_API | Supertest API smoke tests |
| TOKEN_ID | Supertest API smoke tests |
| CODECOV_TOKEN | Codecov uploads when tokens are required (for example, protected branches) |
Mirror secrets (ritovision/ritoswap-mirror)
| Secret | Used for |
|---|---|
| RITOSWAP_PAT | Cross-repo dispatch for private pipelines |
| CODECOV_TOKEN | Codecov uploads for the mirror repo |
Vars (GitHub)
| Var | Used for |
|---|---|
| TEST_BASE_URL | Base URL for smoke tests (currently the testnet build URL) |
| CHAIN_ID | Chain ID for Supertest API tests |
| NEXT_PUBLIC_ENABLE_STATE_WORKER | Toggle used by Supertest API tests |
| NEXT_PUBLIC_AI_CHAT_REQUIRES_JWT | Toggle used by Supertest API tests |
For production, set NEXT_PUBLIC_ENABLE_STATE_WORKER=true and
NEXT_PUBLIC_AI_CHAT_REQUIRES_JWT=true for
dapp/e2e/supertest/api.test.ts and dapp/e2e/supertest/pinecone.test.ts.
The base URL used by smoke tests is TEST_BASE_URL and can be changed if needed.
Predeploy E2E defaults
The predeploy E2E action sets a test-focused environment during local builds. These are defaults in
.github/actions/run-predeploy-e2e/action.yml and do not come from secrets.
| Variable | Default value |
|---|---|
| DATABASE_URL | postgresql://testuser:testpass@localhost:5432/testdb?schema=public |
| NEXT_PUBLIC_ACTIVE_CHAIN | Sepolia |
| JWT_ISS | https://ritoswap.local |
| JWT_AUD | https://api.ritoswap.local |
| JWT_SECRET | test-secret-minimum-32-characters-long-for-hs256-algorithm |
| JWT_ALG | HS256 |
| AI_PROVIDER | lmstudio |
| AI_BASE_URL | http://127.0.0.1:1234 |
| AI_LOCAL_MODEL_1 | llama-3.1-8b-lexi-uncensored-v2 |
| AI_IMAGE_PROVIDER | openai |
| OPENAI_API_KEY | sk-test_dummy_key_for_build_only |
| OPENAI_IMAGE_MODEL | gpt-image-1 |
| NEXT_PUBLIC_ACTIVATE_WORKER | false |