Created
March 21, 2019 18:55
-
-
Save JoelQ/29c270322cc915b8d3bc2b2d26fd7716 to your computer and use it in GitHub Desktop.
Netlify + Parcel deployment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/graphql https://my-prod-server.url/graphql 200 | |
/* /index.html 200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/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