Shopify CLI Docs

shopify hydrogen deploy

Builds and deploys your Hydrogen storefront to Oxygen. Requires an Oxygen deployment token to be set with the --token flag or an environment variable (SHOP

Builds and deploys your Hydrogen storefront to Oxygen. Requires an Oxygen deployment token to be set with the --token flag or an environment variable (SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN). If the storefront is linked then the Oxygen deployment token for the linked storefront will be used automatically.

Usage

shopify hydrogen deploy [flags]

Summary

Builds and deploys your Hydrogen storefront to Oxygen. Requires an Oxygen deployment token to be set with the --token flag or an environment variable (SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN). If the storefront is linked then the Oxygen deployment token for the linked storefront will be used automatically.

Flags

  • --auth-bypass-token — Generate an authentication bypass token, which can be used to perform end-to-end tests against the deployment. optional Environment: AUTH_BYPASS_TOKEN.
  • --auth-bypass-token-duration <value> string — Specify the duration (in hours) up to 12 hours for the authentication bypass token. Defaults to 2 optional Environment: AUTH_BYPASS_TOKEN_DURATION.
  • --build-command <value> string — Specify a build command to run before deploying. If not specified, shopify hydrogen build will be used. optional
  • --entry <value> string — Entry file for the worker. Defaults to ./server. optional Environment: SHOPIFY_HYDROGEN_FLAG_ENTRY.
  • --env <value> string — Specifies the environment to perform the operation using its handle. Fetch the handle using the env list command. optional
  • --env-branch <value> string — Specifies the environment to perform the operation using its Git branch name. optional Environment: SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH.
  • --env-file <value> string — Path to an environment file to override existing environment variables for the deployment. optional
  • --force-client-sourcemap — Client sourcemapping is avoided by default because it makes backend code visible in the browser. Use this flag to force enabling it. optional Environment: SHOPIFY_HYDROGEN_FLAG_FORCE_CLIENT_SOURCEMAP.
  • --json-output — Create a JSON file containing the deployment details in CI environments. Defaults to true, use --no-json-output to disable. optional
  • --lockfile-check — Checks that there is exactly one valid lockfile in the project. Defaults to true. Deactivate with --no-lockfile-check. optional Environment: SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK.
  • --metadata-description <value> string — Description of the changes in the deployment. Defaults to the commit message of the latest commit if there are no uncommited changes. optional Environment: SHOPIFY_HYDROGEN_FLAG_METADATA_DESCRIPTION.
  • --metadata-user <value> string — User that initiated the deployment. Will be saved and displayed in the Shopify admin optional Environment: SHOPIFY_HYDROGEN_FLAG_METADATA_USER.
  • --no-verify — Skip the routability verification step after deployment. optional
  • --path <value> string — The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run. optional Environment: SHOPIFY_HYDROGEN_FLAG_PATH.
  • --preview — Deploys to the Preview environment. optional
  • -f, --force — Forces a deployment to proceed if there are uncommited changes in its Git repository. optional Environment: SHOPIFY_HYDROGEN_FLAG_FORCE.
  • -s, --shop <value> string — Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com). optional Environment: SHOPIFY_SHOP.
  • -t, --token <value> string — Oxygen deployment token. Defaults to the linked storefront's token if available. optional Environment: SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN.

Official source

On this page