Skip to content

Instantly share code, notes, and snippets.

@JoelQ
Created March 21, 2019 18:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoelQ/29c270322cc915b8d3bc2b2d26fd7716 to your computer and use it in GitHub Desktop.
Save JoelQ/29c270322cc915b8d3bc2b2d26fd7716 to your computer and use it in GitHub Desktop.
Netlify + Parcel deployment
#!/bin/sh
set -e
echo "== BUILDING THE APP =="
yarn parcel build src/index.html
echo "== CONFIGURING REDIRECTS =="
if [ "$CONTEXT" = "production" ]; then
cp production_redirects dist/_redirects
else
cp staging_redirects dist/_redirects
fi
/graphql https://my-prod-server.url/graphql 200
/* /index.html 200
/graphql https://my-staging-server.url/graphql 200
/* /index.html 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment