Skip to content

feat: deploy main to staging and tag reports with their environment - #16

Merged
devchaudhary24k merged 7 commits into
mainfrom
dev
Sep 28, 2026
Merged

devchaudhary24k merged 7 commits into
mainfrom
dev

Conversation

@devchaudhary24k

@devchaudhary24k devchaudhary24k commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds a staging deployment so merged changes can be tested before a release, and keeps staging traffic out of production analytics and error reports.

Deployments

  • A merge into main publishes the main image and deploys the staging Dokploy application through the new DOKPLOY_STAGING_WEBHOOK_URL secret.
  • A release (merging the Release Please PR) still publishes latest and the version tags and deploys production through DOKPLOY_WEBHOOK_URL.
  • The single deploy job is split into deploy staging and deploy production, each skipped until its secret is set.

Environment tagging

  • New optional runtime variable HEXLODE_ENVIRONMENT. Staging sets it to staging; when unset, the server reports production (or development locally).
  • The server passes it to the browser with the other public settings.
  • Sentry files every error, log and trace under that environment, in the browser and on the server, so alerts can be limited to production.
  • PostHog adds an environment property to every event, next to app_version, so PostHog's test-account filter can hide staging and development from dashboards.

Docs

  • DEPLOY.md: new "Staging and production" section, the Sentry alert and PostHog filter setup, and HEXLODE_ENVIRONMENT in the variable table.
  • implementation.md and ADR 0005 describe the staging flow and the environment property.

Setup after merging

  1. Dokploy staging app: image ghcr.io/pixelactstudio/hexlode:main, its own HTTPS domain, the same PostHog and Sentry variables as production, plus HEXLODE_ENVIRONMENT=staging.
  2. PostHog: Project settings → Product analytics → Filter out internal and test users, add environment is not staging and environment is not development, and enable it on all new insights.
  3. Sentry: set alert rules to the production environment.

Testing

  • pnpm validate: Biome, types, 556 unit and browser tests, and the production build.
  • Unit tests cover reading HEXLODE_ENVIRONMENT (including the production default and invalid values), passing it to Sentry, and registering it on PostHog events.
  • Checked a built server: with HEXLODE_ENVIRONMENT=staging the page config reports staging, and without it reports production.
  • actionlint passes on the workflows.

Merge note

dev had drifted from main because earlier PRs were squash-merged, which caused the conflicts here. main is now merged into dev with dev's content kept; that content already included everything on main.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

- Add branded header, badges and project principles
- Clarify local image processing and link Pixelact Studio
…s credits (#10)

- Direct the Studio section as GSAP scenes started by ScrollTrigger (ADR 0009)
- Nest card corners: 12px cards with 4-6px corners inside
- Light the footer wordmark under the pointer and credit Damn Labs and Pixelact Studio
- Link hexlode.damnlabs.com from the README
- Add Release Please versioning and image publishing
- Upload Sentry source maps and enable logs and tracing
- Improve privacy-safe PostHog autocapture and deployment docs
- Keep the `main` image for unreleased merges
- Publish `latest` and deploy via Dokploy on releases
- Update deployment documentation
- Add per-tab session drafts with one-day recovery for unsaved work
- Add new/save controls and confirmation before discarding changes
- Document draft storage and privacy behavior
- Label analytics and Sentry reports by deployment environment
- Document staging and production Dokploy setup
@devchaudhary24k devchaudhary24k changed the title ci: automate releases and split staging from production feat: deploy main to staging and tag reports with their environment Sep 28, 2026
@devchaudhary24k
devchaudhary24k merged commit c492b4d into main Sep 28, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant