> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dcdeploy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy from GitHub Repository

> Deploy your services directly from your GitHub repository with optional auto-build support.

[https://app.supademo.com/embed/cmldi8oyt4tdwvhwzuc0uvow9](https://app.supademo.com/embed/cmldi8oyt4tdwvhwzuc0uvow9)

**1. Navigate to Deploy tab**

Navigate to the **Deploy** tab of the environment in your DCDeploy dashboard where you want to deploy your service.

![](https://mintcdn.com/dcdeploy-9454b28e/pB_4WKNF_G09F_LI/docs/deploy/images/deploy.png?fit=max\&auto=format\&n=pB_4WKNF_G09F_LI\&q=85\&s=a7f60611746e34f17663c1c756fa5973)

**2. Add a new service**

Click on **Add Service**. A new form will appear where you can provide details of your service.

**3. Fill in the details**

> [tab] Private repository
>
> Complete the following fields:
>
> * **Service Name**: A unique name is auto-generated by default. You can change it if needed.
> * **Source**: Select **GitHub** as the source.
>
> ![](https://mintcdn.com/dcdeploy-9454b28e/pB_4WKNF_G09F_LI/docs/deploy/images/gh-private-form.png?fit=max\&auto=format\&n=pB_4WKNF_G09F_LI\&q=85\&s=58972bcb719ddf24f019785470ccee4f)
>
> * **Configure** github account, there are two way to Configuration
>
>   * Click on user profile icon top right at navbar
>
>   [https://app.supademo.com/embed/cmldiouh04u84vhwzbi0fopag](https://app.supademo.com/embed/cmldiouh04u84vhwzbi0fopag)
>
>   ![](https://mintcdn.com/dcdeploy-9454b28e/PPFDUcmrmPTTWKMC/docs/deploy/images/user_profile.png?fit=max\&auto=format\&n=PPFDUcmrmPTTWKMC\&q=85\&s=afc3ae64f67957bf00f636a6bb2b1203)
>
>   * Click on profile option
>   * navigate to **connection** tab
>
>   ![](https://mintcdn.com/dcdeploy-9454b28e/pB_4WKNF_G09F_LI/docs/deploy/images/connection.png?fit=max\&auto=format\&n=pB_4WKNF_G09F_LI\&q=85\&s=25c96332d164e88c6daa19ddfaf20e68)
>
>   * and connect your github account\
>     OR in your service form
>   * Click on cog icon right side of the github
>
>   ![](https://mintcdn.com/dcdeploy-9454b28e/pB_4WKNF_G09F_LI/docs/deploy/images/gh-private-form-cog.png?fit=max\&auto=format\&n=pB_4WKNF_G09F_LI\&q=85\&s=8c611b0f5636f774a54288bd5ad5ba5b)
>
>   * Select the account you want to configure
>
>   ![](https://mintcdn.com/dcdeploy-9454b28e/PPFDUcmrmPTTWKMC/docs/deploy/images/select-ghaccount.png?fit=max\&auto=format\&n=PPFDUcmrmPTTWKMC\&q=85\&s=a44b03b1c28ef143073fee841e0437d2)
>
>   * Select the repository you want to deploy or allow all
>
>   ![](https://mintcdn.com/dcdeploy-9454b28e/PPFDUcmrmPTTWKMC/docs/deploy/images/install.png?fit=max\&auto=format\&n=PPFDUcmrmPTTWKMC\&q=85\&s=41aea6124530441d293795fae2a42a26)
>
>   * Click on install
> * **Repository**: Choose the GitHub repository you want to deploy
>
> ![](https://mintcdn.com/dcdeploy-9454b28e/pB_4WKNF_G09F_LI/docs/deploy/images/private-repo.png?fit=max\&auto=format\&n=pB_4WKNF_G09F_LI\&q=85\&s=f63032c2b3ef8b7e682d3850a8ca2ad6)

> [tab] Public repository
>
> Complete the following fields:
>
> * **Service Name**: A unique name is auto-generated by default. You can change it if needed.
> * **Source**: Select **GitHub** as the source.
>
> ![](https://mintcdn.com/dcdeploy-9454b28e/pB_4WKNF_G09F_LI/docs/deploy/images/gh-public-form.png?fit=max\&auto=format\&n=pB_4WKNF_G09F_LI\&q=85\&s=619a54ea5dfe5c21584baa490334fdd9)
>
> * **Repository**: Choose the GitHub repository where your code resides. Make sure your repository should be  **public** repositories.

**Step 4**

* **Branch / Tag**: Select the branch or tag you want to deploy from.
* **Build Context**: Provide the path in your repo where the Docker build should run (default is `./`).
* **Dockerfile Path**: Specify the Dockerfile path if it’s not in the root directory (default is `./`).
* **Auto Build (Optional)**: Enable auto-build to automatically trigger a new build whenever you push to the selected branch.

**5. Configure runtime settings**

Configure how your service should run:

* **Port**: Enter the port number your service listens on. Ensure your app binds to `0.0.0.0` on this port.
* **Protocol**: HTTPS is the default protocol.
* **Region**: Select the DCDeploy region(s) where you want your service deployed.
* **Machine Type**: Choose from available DCDeploy machine types (CPU, RAM, and Disk). [See details here](https://dcdeploy.com/pricing/).
* **CPU/Memory Usage Limits**: Configure resource limits according to your service requirements.
* **Environment Variables**: Provide environment variables directly paste your `.env` file or add manually.
* **Scaling Options**:
  * Define minimum and maximum instances.
  * Enable **Auto Scaling** to automatically scale based on traffic or CPU/memory thresholds.

**6. Deploy**

Click the **Continue** button.

![](https://mintcdn.com/dcdeploy-9454b28e/pB_4WKNF_G09F_LI/docs/deploy/images/summary.png?fit=max\&auto=format\&n=pB_4WKNF_G09F_LI\&q=85\&s=87ba5a0954ee94d2eeebd04a4ffd940f)

* You’ll be asked for confirmation before deployment.
* If multiple services are added, removed, or updated, confirmation will cover all changes.

![](https://mintcdn.com/dcdeploy-9454b28e/pB_4WKNF_G09F_LI/docs/deploy/images/confirm.png?fit=max\&auto=format\&n=pB_4WKNF_G09F_LI\&q=85\&s=8947c28d900e85e8cdca6d255e9f8ae4)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.