Skip to content

Instantly share code, notes, and snippets.

@markmur
Last active August 17, 2018 11:45
Show Gist options
  • Save markmur/d1ae2c56a76b5b836b3e8b82b5be895b to your computer and use it in GitHub Desktop.
Save markmur/d1ae2c56a76b5b836b3e8b82b5be895b to your computer and use it in GitHub Desktop.
Now: deploy, alias latest and remove old deployments
{
"name": "app-name",
"alias": "app-name.now.sh"
}
# THIS COMMAND SHOULD ONLY BE USED IF YOU DON'T CARE ABOUT KEEPING OLD DEPLOYMENTS
#
# Now: deploy, alias latest and remove old deployments
#
# "--safe" keeps the latest deployment and removes the rest,
# "-y" is shorthand for "--yes" which skips the confirmation dialog
now --public && now alias && now rm YOUR_APP_NAME --safe -y
{
"scripts": {
"deploy": "now --public && now alias && now rm YOUR_APP_NAME --safe -y"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment