Migrate from oxygenctl-action to Hydrogen CLI #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introducing the
deploycommandThe
shopify/oxygenctl-actionis being deprecated and all merchants are encouraged to migrate to the Hydrogen CLIdeploycommandImportant
To use the
deploycommand, upgrade your Hydrogen project to use Hydrogen CLI v7.0.0 or later:npm install @shopify/cli-hydrogen@latest.Understanding the code changes
This pull request will try to automate the migration for you but you might need to make manual changes. There are two important changes:
shopify/oxygenctl-actionto usenpx shopify hydrogen deployshopify/github-deployment-actionTip
Try viewing the file changes with white space disabled, since there may be unrelated formatting changes.
Manual changes
If you've heavily modified your workflow file(s) and the diff generated by this pull request is too large, you can implement these changes yourself. Here are some simplified examples of the required updates:
Migrate from
shopify/oxygenctl-actiontonpx shopify hydrogen deploy- name: Build and Publish to Oxygen id: deploy - uses: shopify/oxygenctl-action@v4 + run: npx shopify hydrogen deploy + env: + SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN: ${{ secrets.OXYGEN_DEPLOYMENT_TOKEN_X }} - with: - oxygen_deployment_token: ${{ secrets.OXYGEN_DEPLOYMENT_TOKEN_X }} - build_command: "npm run build"Remove
shopify/github-deployment-actionTroubleshooting
Command `hydrogen deploy` not found.errorThe
deploycommand was publicly released with@shopify/cli-hydrogenv7.0.0. You'll need to update to v7.0.0 or later in order to usedeploy. Learn more about the release in the changelog.Nonexistent flagerrorThe
--build-commandand--no-verifyflags were released with@shopify/cli-hydrogenv7.1.0. If your workflow file includes those flags, you'll need to update to v7.1.0 or later to use them. Learn more about the release in the changelog.