hydrogen deploycommand
Builds and deploys your Hydrogen storefront to Oxygen. Requires an Oxygen deployment token to be set with the --token
flag or an environment variable (). If the storefront is linked then the Oxygen deployment token for the linked storefront will be used automatically.
Anchor to flagsFlags
The following flags are available for the hydrogen deploy
command:
- Anchor to --auth-bypass-token--auth-bypass-tokenenv: AUTH_BYPASS_TOKEN
Generate an authentication bypass token, which can be used to perform end-to-end tests against the deployment.
- Anchor to --auth-bypass-token-duration <value>--auth-bypass-token-duration <value>stringenv: AUTH_BYPASS_TOKEN_DURATION
Specify the duration (in hours) up to 12 hours for the authentication bypass token. Defaults to
2
- Anchor to --build-command <value>--build-command <value>string
Specify a build command to run before deploying. If not specified,
shopify hydrogen build
will be used.- Anchor to --entry <value>--entry <value>stringenv: SHOPIFY_HYDROGEN_FLAG_ENTRY
Entry file for the worker. Defaults to
./server
.- Anchor to --env <value>--env <value>string
Specifies the environment to perform the operation using its handle. Fetch the handle using the
env list
command.- Anchor to --env-branch <value>--env-branch <value>stringenv: SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH
Specifies the environment to perform the operation using its Git branch name.
- Anchor to --env-file <value>--env-file <value>string
Path to an environment file to override existing environment variables for the deployment.
- Anchor to --json-output--json-output
Create a JSON file containing the deployment details in CI environments. Defaults to true, use
--no-json-output
to disable.- Anchor to --lockfile-check--lockfile-checkenv: SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK
Checks that there is exactly one valid lockfile in the project. Defaults to
true
. Deactivate with--no-lockfile-check
.- Anchor to --metadata-description <value>--metadata-description <value>stringenv: SHOPIFY_HYDROGEN_FLAG_METADATA_DESCRIPTION
Description of the changes in the deployment. Defaults to the commit message of the latest commit if there are no uncommited changes.
- Anchor to --metadata-user <value>--metadata-user <value>stringenv: SHOPIFY_HYDROGEN_FLAG_METADATA_USER
User that initiated the deployment. Will be saved and displayed in the Shopify admin
- Anchor to --no-verify--no-verify
Skip the routability verification step after deployment.
- Anchor to --path <value>--path <value>stringenv: SHOPIFY_HYDROGEN_FLAG_PATH
The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
- Anchor to --preview--preview
Deploys to the Preview environment.
- Anchor to -f, --force-f, --forceenv: SHOPIFY_HYDROGEN_FLAG_FORCE
Forces a deployment to proceed if there are uncommited changes in its Git repository.
- Anchor to -s, --shop <value>-s, --shop <value>stringenv: SHOPIFY_SHOP
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).
- Anchor to -t, --token <value>-t, --token <value>stringenv: SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN
Oxygen deployment token. Defaults to the linked storefront's token if available.
hydrogendeploy
- --auth-bypass-token
Generate an authentication bypass token, which can be used to perform end-to-end tests against the deployment.
""
- --auth-bypass-token-duration <value>
Specify the duration (in hours) up to 12 hours for the authentication bypass token. Defaults to `2`
string
- --build-command <value>
Specify a build command to run before deploying. If not specified, `shopify hydrogen build` will be used.
string
- --entry <value>
Entry file for the worker. Defaults to `./server`.
string
- --env <value>
Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.
string
- --env-branch <value>
Specifies the environment to perform the operation using its Git branch name.
string
- --env-file <value>
Path to an environment file to override existing environment variables for the deployment.
string
- --json-output
Create a JSON file containing the deployment details in CI environments. Defaults to true, use `--no-json-output` to disable.
""
- --lockfile-check
Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.
""
- --metadata-description <value>
Description of the changes in the deployment. Defaults to the commit message of the latest commit if there are no uncommited changes.
string
- --metadata-user <value>
User that initiated the deployment. Will be saved and displayed in the Shopify admin
string
- --no-verify
Skip the routability verification step after deployment.
""
- --path <value>
The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
string
- --preview
Deploys to the Preview environment.
""
- -f, --force
Forces a deployment to proceed if there are uncommited changes in its Git repository.
""
- -s, --shop <value>
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).
string
- -t, --token <value>
Oxygen deployment token. Defaults to the linked storefront's token if available.
string
export interface hydrogendeploy {
/**
* Generate an authentication bypass token, which can be used to perform end-to-end tests against the deployment.
* @environment AUTH_BYPASS_TOKEN
*/
'--auth-bypass-token'?: ''
/**
* Specify the duration (in hours) up to 12 hours for the authentication bypass token. Defaults to `2`
* @environment AUTH_BYPASS_TOKEN_DURATION
*/
'--auth-bypass-token-duration <value>'?: string
/**
* Specify a build command to run before deploying. If not specified, `shopify hydrogen build` will be used.
*
*/
'--build-command <value>'?: string
/**
* Entry file for the worker. Defaults to `./server`.
* @environment SHOPIFY_HYDROGEN_FLAG_ENTRY
*/
'--entry <value>'?: string
/**
* Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.
*
*/
'--env <value>'?: string
/**
* Specifies the environment to perform the operation using its Git branch name.
* @environment SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH
*/
'--env-branch <value>'?: string
/**
* Path to an environment file to override existing environment variables for the deployment.
*
*/
'--env-file <value>'?: string
/**
* Forces a deployment to proceed if there are uncommited changes in its Git repository.
* @environment SHOPIFY_HYDROGEN_FLAG_FORCE
*/
'-f, --force'?: ''
/**
* Create a JSON file containing the deployment details in CI environments. Defaults to true, use `--no-json-output` to disable.
*
*/
'--json-output'?: ''
/**
* Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.
* @environment SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK
*/
'--lockfile-check'?: ''
/**
* Description of the changes in the deployment. Defaults to the commit message of the latest commit if there are no uncommited changes.
* @environment SHOPIFY_HYDROGEN_FLAG_METADATA_DESCRIPTION
*/
'--metadata-description <value>'?: string
/**
* User that initiated the deployment. Will be saved and displayed in the Shopify admin
* @environment SHOPIFY_HYDROGEN_FLAG_METADATA_USER
*/
'--metadata-user <value>'?: string
/**
* Skip the routability verification step after deployment.
*
*/
'--no-verify'?: ''
/**
* The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
* @environment SHOPIFY_HYDROGEN_FLAG_PATH
*/
'--path <value>'?: string
/**
* Deploys to the Preview environment.
*
*/
'--preview'?: ''
/**
* 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).
* @environment SHOPIFY_SHOP
*/
'-s, --shop <value>'?: string
/**
* Oxygen deployment token. Defaults to the linked storefront's token if available.
* @environment SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN
*/
'-t, --token <value>'?: string
}
Hydrogen deploy
examples
hydrogen deploy
hydrogen deploy
shopify hydrogen deploy [flags]