Ephemeral Environments
ELI5 - The Vibe Check
An ephemeral environment is a full, working copy of your app spun up automatically for a single pull request, and torn down the moment that PR closes. Instead of everyone fighting over one shared staging server that's perpetually broken by someone else's half-finished feature, every PR gets its own clean sandbox that lives and dies with it.
Real Talk
Ephemeral environments are short-lived, isolated deployments created automatically for a specific branch, pull request, or test run, and destroyed once no longer needed. They give reviewers and automated tests a real, fully deployed environment to work against without the contention and drift of a single shared staging environment.
Show Me The Code
on:
pull_request:
types: [opened, synchronize]
jobs:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run deploy:preview -- --pr=${{ github.event.number }}
# torn down automatically when the PR closes
When You'll Hear This
"Every PR gets an ephemeral environment now, reviewers can click through the actual feature before approving." / "The ephemeral environment for that branch already got torn down, spin up a new one."
Related Terms
Canary Deployment
Canary deployment is releasing your new code to a tiny percentage of users first to see if it explodes.
CI Testing
CI Testing is running all your tests automatically every time someone pushes code.
Deployment
A deployment is the event of pushing your code live — it's both the action and the thing you deployed.
Staging
Staging is a fake version of your real app that looks and acts exactly like production but has zero real users.