So currently my flow is I develop a feature, merge it with Development, get my client to review, then if they happy, I merge to master and it triggers a Production build in Netlify.
Is there a way to Publish Deploy Development build that already happened but this time it should use the config values of the Production build. This will save me from merging to master branch. I guess I can do away with the master branch if this works.
Maybe my git flow is wrong.
I have a netlify toml file which looks like the following:
[context.production]
command = "npm run build"
[context.production.environment]
GATSBY_SQ_ACCESS_TOKEN = "xxx"
GATSBY_SQ_API_URL = "x"
GATSBY_SQ_LOCATION_ID = "x"
GATSBY_SQ_APP_ID = "x"
GATSBY_SQ_PAYMENT_SCRIPT_URL = "x"
# Branch Deploy context: all deploys that are not from a pull/merge request or
# from the Production branch will inherit these settings.
[context.branch-deploy]
command = "NODE_ENV=development npm run build"
NODE_ENV = "development"
[context.branch-deploy.environment]
NODE_ENV = "development"
GATSBY_SQ_ACCESS_TOKEN = ""
GATSBY_SQ_API_URL = "zzzz"
GATSBY_SQ_LOCATION_ID = "zzzz"
GATSBY_SQ_APP_ID = "sandbox-zzzz"
GATSBY_SQ_PAYMENT_SCRIPT_URL="https://js.squareupsandbox.com/v2/paymentform"