A SuperPlane app that spins up preview environments on AWS EC2 for GitHub pull requests. Comment /start on a PR, get a running app on a fresh instance in ~2 minutes. Close the PR, environment auto-destroys.
- Open a PR — the bot posts a welcome comment with instructions
- Comment
/start— creates an EC2 instance, deploys your app via SSH, runs a health check, and posts the preview URL - Comment
/destroy— tears everything down - Close or merge the PR — environment auto-destroys
- A scheduled TTL check cleans up environments older than 24 hours
GitHub Deployments are created for each environment, so you get the native "View deployment" button and status badges on the PR.
- A SuperPlane account with GitHub and AWS integrations connected
- An EC2 key pair registered in AWS
- The corresponding private key stored as a SuperPlane secret (key name:
private-key)
Click Launch in SuperPlane at the top of this page. The wizard will walk you through connecting integrations, selecting your repository, picking an SSH secret, and entering your EC2 key pair name.
The app includes scripts/preview-setup.sh in the Files tab. This script runs on each new instance to install dependencies and start your application.
The default script sets up a Node.js app with nginx. Edit it to match your own stack — different runtime, build steps, service configuration.
The script receives these environment variables from the workflow:
PR_NUMBER— the pull request numberREPO_URL— the full clone URL of the repository
MIT