While we build features and fixes, we want to regularly share our work with stakeholders, the product team, and QA so that we can all be sure we are moving toward the right destination. Ideally, we would share our work every day because frequent sharing results in frequent feedback which ultimately results in fewer significant deviations from our intended course. To do this we use review apps.
Review apps are application deployments that represent a specific branch or local build that allow a wider audience to review work in progress. Review apps are not intended to be staging or QA environments where we can evaluate quality or stability. Instead, they are intended to vet direction and support collaboration with adjacent teams.
Netlify is a static hosting provider that has some good tooling for sharing work in progress apps. We can use it to automatically deploy new branches using git hooks. We can also use it to deploy a local build.
We often have dependencies that have separate hosting and CI/CD pipelines. Consequently, deploying a local build allows us to deploy local changes to all dependencies without having to orchestrate downstream package management and CI/CD. This is the simplest way to share your work in progress.
npm install netlify-cli -gnetlify loginnpm run buildnetlify deploy --prod// Use the name of the feature or your name when asked to name the app.// Enter "dist" when asked for the Deploy Path
First, make sure that you have the Netlify CLI installed.
Next, build the app
npm run build.
Now that you have the app built you can begin the deployment to Netlify by running the Netlify CLI
netlify deploy --prod
If this is your first time deploying Shift to Netlify choose Create and Configure new site from the options. Otherwise choose Link this directory to an existing site.
When asked to name the app use the name of the feature or your name to distinguish it from other apps that have already been deployed to the Shift Netlify account.
When asked for Deploy path enter
The Netlify CLI will now deploy the Shift app and will give you a URL where you can see your deployment:
If this is your first time deploying this site you should make sure it's password protected to prevent web crawlers from indexing it. Log in to the Netlify web app and choose your app. Go to Site Settings and choose Access Control. Click Set Password and choose a password that you can share with members of your team.