Description
openedon Jun 20, 2024
What is the location of your example repository?
No response
Which package or tool is having this issue?
CLI
What version of that package or tool are you using?
8.1.0
What version of Remix are you using?
No response
Steps to Reproduce
Scenario 1:
- Run this in your CLI in a branch
hotfix/123
- Run
npx shopify hydrogen deploy --env-branch="main"
ornpx shopify hydrogen deploy --env="Production"
Scenario 2:
- Run this in your CLI in the
main
branch - Run
npx shopify hydrogen deploy --env-branch="main-preview"
ornpx shopify hydrogen deploy --env="Preview"
Expected Behavior
Scenario 1: Deploy the hotfix/123
branch to Production environment
Why: When there is a bug in the live website, we want to deploy a fix for it without worrying about testing all other changes included in main
. For this, it is required to deploy a branch that isn't main
to Production
Scenario 2: Deploy the main
branch to Preview environment
Why: Before deploying to Production, we'd like to test the changes in a Preview environment, to spot any bugs.
Why not test the preview environment in the PRs?
In PRs, the changes are deployed to a different Shopify Instance, where we have test data that isn't available for real customers.
We don't want to test PRs additionally in production as well, to avoid sending test user data to our analytics teams, and to make development faster.
Actual Behavior
Scenario 1:
- When using
env-branch
, the command runs, but deploys to Preview - When using
env
, the command fails, warning that it shouldn't be used in CIs
Scenario 2:
- When using
env-branch
, the command runs, but deploys to Production - When using
env
, the command fails, warning that it shouldn't be used in CIs