Deployments
Oxygen supports continuous deployment, so your Hydrogen app is deployed every time you push an update to its linked GitHub repository. A deployment is an immutable snapshot, and every deployment has its own unique preview URL so that you can view, test, or approve changes before merging them.
Deployment management
Anchor link to section titled "Deployment management"Creating deployments
Anchor link to section titled "Creating deployments"Oxygen automatically makes its first deployment when you create a new storefront.
You can make additional deployments by creating commits and pushing them to your connected repository. Every push triggers a new deployment.
Deployment visibility
Anchor link to section titled "Deployment visibility"By default, each deployment is private, which means that you need to be logged into your store to view it. You can make individual deployments public, which means that anyone with the deployment URL can view it.
To prevent search engines from incorrectly indexing any preview deployments, the robots.txt
file in any non-production public deployment is overridden with a disallow
rule.
Toggle deployment URL visibility
Anchor link to section titled "Toggle deployment URL visibility"- In your Hydrogen storefront, open the deployment details page for the deployment that you want to update.
- Click Actions.
- Click Make deployment public or Make deployment private.
Changing deployment visibility can take up to 15 seconds.
Deployment rollbacks
Anchor link to section titled "Deployment rollbacks"By default, environment URLs point to the environment’s most recent deployment.
If the most recent update contains a bug or other error, you can temporarily roll back to a previous deployment while you work on a fix. Rolling back doesn't redeploy or delete any deployments; it simply changes which deployment the environment URL points to.
Roll back to a previous deployment
Anchor link to section titled "Roll back to a previous deployment"Only production and custom environments can be rolled back.
- On your Hydrogen storefront overview page, click
…
on the environment to roll back. - Click View deployments.
- In the list of deployments, click
…
beside the deployment to roll back to. - Click Make this the current deployment.
- Click Make current for {Environment} to confirm.
The next time that you push an update to its linked branch, the environment will return to the default behavior of pointing to the most recent deployment.
Deployment immutability
Anchor link to section titled "Deployment immutability"Every deployment in Oxygen is immutable, which means that a deployment is a snapshot of a single Git commit in your Hydrogen app codebase, at a specific point in time.
Deployments also retain all the environment variables that they had at the time they were deployed. Whenever you update an environment variable, push a commit to the relevant branch to trigger a new deployment.