jsmrcaga / action-netlify-deploy

MIT License
102 stars 32 forks source link

fix: do not pass --alias and --prod together #15

Closed tpluscode closed 3 years ago

tpluscode commented 3 years ago

I changed my setup to use both deploy_alias and NETLIFY_DEPLOY_TO_PROD so that I have single step which works both for PR branches and main branch.

with:
  deploy_alias: ${{ env.BRANCH_NAME }}
  NETLIFY_DEPLOY_TO_PROD: ${{ env.BRANCH_NAME == 'master' }}

Apparently Netlify CLI does not like both combined.

Of course, it's possible to be creative in the workflow YAML but this should just do

jsmrcaga commented 3 years ago

Thank you for all your contributions @tpluscode ! I'll be adding a "contributor" section on the Readme to credit you!