Create a Project Using GitHub

Launch lets you connect your GitHub account and access the repositories while creating projects. You must first connect your GitHub account to Launch to create projects using your GitHub repositories.

This document guides you through the process of connecting your GitHub account and creating a project in Launch using the GitHub repositories.

Prerequisites

Connect your GitHub Account to Launch and Deploy a Project

Note Only the Organization Admin/Owner has the right to create projects in a stack for Launch.

  1. Click the Launch option from the dashboard, as shown below.
    Click to enlarge
  2. Click + New Project.
    Click to enlarge
  3. From the Create New Project modal, click Import from a Git Repository.

    Click to enlarge

  4. Click Connect Account in the GitHub card.

    Click to enlarge

    A pop-up will open with connection details.

  5. Enter the login credentials of your GitHub account.

    Click to enlarge

  6. Select the option to choose All repositories or Only select repositories, and then click the Save button.

    Important Only GitHub users with the Owner or Admin role in the organization can provide access to repositories.

    Click to enlarge

    Note If you are accessing GitHub through Contentstack for the first time, you must authorize Contentstack by clicking the Install & Authorize button after selecting All repositories. 

    Click to enlarge

    The Create New Project modal appears with the deployment steps.

    Now you can either proceed with the deployment steps or click Cancel to view the GitHub connection you just created. 

    Click to enlarge

    GitHub displays a Connected tag on successful connection to Launch in the Create New Project modal.

    NoteIf you encounter an error with your GitHub connection, follow the steps in the Troubleshooting section of this guide to repair it.

  7. If you selected Cancel in the previous step, click GitHub to proceed with the deployment steps.
  8. Fill in the following details to deploy your project in Launch.
    1. Repository (Mandatory): All repositories from your GitHub organization are listed in the Repository dropdown.
      • Click the Select repository dropdown.
        Click to enlarge

        Note The repositories listed depend on the configuration you choose while installing the app.

      • Select the repository with which you want to create a project.
    2. Git Branch (Mandatory): Once a repository is selected, the Git Branch drop-down populates with the repository’s default branch. The Detected framework section detects and displays the supported framework based on the GitHub repository you selected.
      • Select a branch from the dropdown to select a different branch.
        Click to enlarge
    3. Project Name (Mandatory): The project name is auto-populated based on the repository you selected.
      • If you want to use a different project name, enter a project name without exceeding 200 characters.
    4. Environment Name (Mandatory): By default, the environment name is populated as Default. You can change the environment name as per your requirement.
      Click to enlarge
    5. Build and Output Settings (Mandatory): The fields in this section get populated based on the detected framework.
      • Framework Preset(Mandatory): Framework of the selected project.
      • Build Command (Mandatory): Command to build the project.
      • Output Directory (Mandatory): Directory path where the project’s build output files get stored.
    6. Environment Variables (Optional)
      • Enter the key and value of your environment variables, in the Key Value Edit section.
      • You can also add the key-value pairs in bulk in the Bulk Edit section.
      • Click the + Add Environment Variable button to add more environment variables.
        Click to enlarge
  9. Once all the fields are filled with appropriate values, click the Deploy button. 

You have successfully deployed a project! 

Click to enlarge

Delete the Project

  1. Click the Settings icon.
  2. In the General section, click the Delete Project button under Delete Project.
    Click to enlarge
  3. Enter DELETE and then click the Yes, Delete button.
    Click to enlarge

    WarningThis action will remove all domains associated with this project. After the removal, your Contentstack domains will still be available for use.

This deletes your project successfully.

Troubleshooting

If you are experiencing connection issues or errors with your GitHub integration, follow the steps below to troubleshoot the problem based on the specific error encountered.

  1. In the Create New Project modal, click the ellipses in the GitHub card, and click Disconnect GitHub
    Click to enlarge
  2. Click here to navigate to the Applications page in GitHub and click Configure next to the app that must be uninstalled. 
    Click to enlarge
  3. Scroll down to the bottom of the page and click Uninstall to remove the GitHub app. 
    Click to enlarge
  4. Navigate back to Contentstack Launch.

    NoteIt is recommended to reconnect GitHub using a different browser. For example, if you are currently using Google Chrome, try Firefox, Safari, or another browser to perform the reconnection steps.

  5. Follow the instructions again to Connect your GitHub Account to Launch and Deploy a Project.