Netlify versions all deploys. From the "Deploys" tab for your site in the Netlify UI, you can browse any deploy you've ever made and preview it from a unique URL.
If you need to roll back, any previous deploy can be selected as the live version of your site in production by using the Publish Deploy button on the detail page of any successful deploy. Rollbacks are instantaneous.
If your Netlify site is connected to a Git repository and has auto publishing turned on, any new Git-triggered production deploys will overwrite the previously rolled back version.
Locked deploys give you the ability of pinning a site to the latest published deploy for the time being. New deploys won't be published to the main site, although Netlify will still build them and they will be ready for whenever you want to publish them.
Lock a published deploy
You can lock a deploy by disabling auto publishing. To disable auto publishing, navigate to your site's deploy list and click "Stop auto publishing".
Unlock a locked deploy
After a deploy has been locked, you can unlock it from the same deploys listing by clicking "Start auto publishing".
This feature may not be available on all plans.
You can get notifications about locked deploys via email, outgoing webhook, or Slack. Netlify can notify you when a deploy is either locked or unlocked.
You can configure these notifications from the notifications section in your site dashboard at Settings > Build & deploy > Deploy notifications. Visit the deploy notifications documentation to learn more.
Cancel a deploy
Sometimes, you may want to cancel a deploy after it has started. To do this, go to the detail page of the deploy in progress and select Cancel deploy. You'll then be prompted to confirm the canceling action. Select Yes, cancel deploy to confirm.
If you later want to restart the deploy, go to the detail page for the deploy and select Retry deploy > Deploy site.
Skip a deploy
Sometimes, you may want to push commits to your production branch without triggering a deploy on Netlify. To do this, add
[skip ci] anywhere in the Git commit message.
In the case of multiple commits pushed together, add
[skip ci] to the most recent commit, and it will apply to all other commits in the push.
The next commit pushed without
[skip ci] will trigger a new deploy, including all changes from the skipped commits as well. To trigger a deploy at will, go to your site's Deploys page and click Trigger deploy at the top of the deploy list.
Another way to allow production branch changes without affecting your published site is to lock a published deploy.
Deploy environment variables
You can set environment variables in the Netlify UI to control the environment your site gets deployed to. Deploy environment variables are available to serverless functions at runtime, snippet injection during post processing, and more.
- Site-level environment variables are controlled in your site dashboard under Settings > Build & deploy > Environment > Environment variables.
- Team-level environment variables are controlled your team settings under Settings > Sites > Global site settings > Shared environment variables. (This feature may not be available on all plans.)
Variables set at the team level are shared by all sites owned by the team. These can be overridden by variables set at the site level.
Did you find this doc useful?
Your feedback helps us improve our docs.