Skip to content

Instantly share code, notes, and snippets.

@crazko
Created January 14, 2019 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crazko/ab580ddb208c0b247ec22119b536dfdc to your computer and use it in GitHub Desktop.
Save crazko/ab580ddb208c0b247ec22119b536dfdc to your computer and use it in GitHub Desktop.
Shell script run from Travis to perform a deploy to Netlify via zip file
#!/usr/bin/env bash
set -e
cd dist
zip -r ../site.zip ./*
cd ..
curl -H "Content-Type: application/zip" \
-H "Authorization: Bearer $NETLIFY_TOKEN" \
--data-binary "@site.zip" \
https://api.netlify.com/api/v1/sites/$NETLIFY_SITE/deploys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment