> For the complete documentation index, see [llms.txt](https://nghiaxchis.gitbook.io/ciseco-hydrogen-shopifys-headless-theme/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nghiaxchis.gitbook.io/ciseco-hydrogen-shopifys-headless-theme/ciseco-with-development-store/step-6.1.-deployments-with-github.md).

# Step 6.1. Deployments with GitHub

{% hint style="info" %}
Cisec - is a project completely based on Shopify's Hydrogen so project deployment is completely compliant with Hydrogen, so please follow Hydrogen's implementation guide for the clearest view.

👉  <https://shopify.dev/docs/custom-storefronts/hydrogen/deployments>
{% endhint %}

## Deployments Ciseco with GitHub

Hydrogen supports CI/CD with GitHub out of the box. If you connect the [Hydrogen channel](https://shopify.dev/docs/custom-storefronts/hydrogen/fundamentals#hydrogen-channel) to GitHub, then Oxygen will automatically deploy every time you push or merge changes in your Hydrogen repository.

When using Hydrogen with GitHub, you have two options:

* [Connect an existing Hydrogen app repository](https://shopify.dev/docs/custom-storefronts/hydrogen/deployments/github#connect-an-existing-repo)
* [Scaffold a new repository from the Shopify admin](https://shopify.dev/docs/custom-storefronts/hydrogen/deployments/github#create-a-new-repo)

### Requirements  <a href="#requirements" id="requirements"></a>

* A Shopify account on a [supported plan](https://shopify.dev/docs/custom-storefronts/hydrogen/fundamentals#supported-plans).
* A GitHub account.
* The Ciseco - Hydrogen project has been pushed to your GitHub repo.
* The [Shopify GitHub App](https://github.com/marketplace/shopify-online-store/) is installed on your GitHub account.

### Connect an existing repo  <a href="#connect-an-existing-repo" id="connect-an-existing-repo"></a>

You can [upload your Ciseco repository to GitHub](https://docs.github.com/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github#adding-a-local-repository-to-github-using-git) and then connect it to Shopify.

#### Step 1: Connect your GitHub repo to the Hydrogen channel  <a href="#step-1-connect-your-github-repo-to-the-hydrogen-channel" id="step-1-connect-your-github-repo-to-the-hydrogen-channel"></a>

1. In the Shopify admin, under **Sales channels**, click **Hydrogen**.
2. Click **Create storefront**.
3. Type a name for your new storefront. The name can be edited later.
4. Make sure **Set up GitHub continuous deployment now** is selected.
5. Select your GitHub account or organization from the dropdown.
6. Select the repository for your Ciseco Hydrogen storefront.
7. Click **Connect**.

Oxygen pulls a copy of your Hydrogen app code base and automatically creates a preview deployment. The Shopify GitHub app also opens a pull request in your repo to add a GitHub Actions workflow file to handle future deployments.

#### Step 2: Merge your Oxygen workflow file  <a href="#step-2-merge-your-oxygen-workflow-file" id="step-2-merge-your-oxygen-workflow-file"></a>

The Shopify GitHub app automatically opens a pull request to create this file when you connect a repo:

![Hydrogen storefront overview page with an alert banner asking to review and merge a pull request on GitHub](https://shopify.dev/assets/custom-storefronts/hydrogen/oxygen-pr-5db72aa12e9d14d9334acab6da5b1afc818a3b36c6572b2f4887f8202e84a9b0.png)

Follow these steps to finish configuring your Hydrogen app for continuous deployment to Oxygen:

1. In the Hydrogen channel, click the name of the storefront that you just created.
2. Click **Review and merge on GitHub** to open the pull request in a new tab.
3. Follow GitHub’s prompts to [merge the PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request).
4. Close the tab to return to the Hydrogen storefront overview.

Oxygen will automatically create a new deployment in your production environment and continue watching your repo for updates. Each time you push one or more commits to your repo, Oxygen will create a new preview deployment with your changes.
