---
name: azion-import-a-project-from-github
description: >-
  Import a GitHub repository in Azion Console to build and deploy it as an application that deploys again on every push.
---

# Import a project from GitHub

You can import a GitHub repository in Azion Console to build and deploy it as an [application](/en/documentation/platform/applications/). After the import, every push to the repository deploys it again. To deploy a project from your terminal instead, refer to [Azion CLI deploy](/en/documentation/devtools/cli/deploy/).

---

## Prerequisites

- An Azion account. To create one, refer to [Create an account](/en/documentation/fundamentals/creating-account/).
- A GitHub account.
- A repository built with a framework that the **Preset** list carries: Next.js, Angular, Astro, Hexo, React, or Vue. For details on each framework, refer to [Frameworks compatibility](/en/documentation/devtools/runtime/frameworks/frameworks-compatibility/).
- The project code at the root of the repository, not in a subdirectory.

To start from a working project, fork one of the [Azion code samples](https://github.com/aziontech/azion-samples/tree/dev/templates) and import your fork.

---

## Import the repository

The import form connects Azion Console to your GitHub account, reads one repository, and deploys it with the framework preset you select.

To import the repository in Azion Console:

1. **Open the create dialog**

   Access [Azion Console](https://console.azion.com/) > **Create**. The **New** dialog opens.

2. **Open the Import from GitHub tab**

   In the **New** dialog, select the **Import from GitHub** tab. On an account with no deployments, the **Import** button of the **Home** page opens the same tab.

3. **Select the import card**

   In the **Import from GitHub** tab, select the card. The **Import from GitHub** page opens.

4. **Connect your GitHub account**

   In the **GitHub Connection** section, select **Connect with GitHub**. A GitHub window opens and asks you to install the [Azion GitHub App](/en/documentation/guides/application-development/automation/azion-github-app/). Set its permissions and repository access, then confirm the installation.

   The **Connect with GitHub** button shows only while no GitHub account is connected.

5. **Select the scope**

   In **Git Scope**, select the GitHub account to import from. To connect another account, select **Add GitHub Account**.

6. **Select the repository**

   In **Repository**, select the repository. The list stays unavailable until you select a scope.

7. **Name the application**

   In the **General** section, keep or change the **Application Name**. The Console fills it with the repository name.

   The name must be unique on your account; a name already in use returns an error. The storage bucket and the function of the project take the same name.

8. **Select the preset**

   In **Preset**, select the framework of the repository: *Next.js*, *Angular*, *Astro*, *Hexo*, *React*, or *Vue*. The preset sets the initial settings for that framework.

9. **Set the root directory**

   In **Root Directory**, keep `/`, the default. The value must start with `/` and cannot contain `..` or spaces.

10. **Enter the install command**

    In **Install Command**, enter the command that installs the project. For example: `npm install`.

11. **(Optional) Add project variables**

    In the **Variables** section, select **Variable**, then enter a **Key** and a **Value**. For example: key `API_URL`, value `www.apiurl.com/abc`.

    The key accepts upper-case letters, numbers, and underscores. After the deploy, you can edit a variable, or turn it into a secret, on the **Variables** page of the **Account** menu.

12. **Select Deploy**

    The **Deploy** button stays unavailable until every required field holds a valid value.

The deploy page opens with the title `Deploy: <Application Name>` and shows **Project is being created** while the build runs.

---

## Check the deployment

The deploy page of an imported repository shows the build output in the **Deploy Log** panel and links the application when the deploy ends.

To check the deployment in Azion Console:

1. **Follow the build**

   On the deploy page, read the build output in the **Deploy Log** panel. When the deploy ends, a **Successfully created!** notification appears.

2. **Open the application domain**

   On the application card, select the domain link. The domain has the format `xxxxxxxxxx.map.azionedge.net`.

3. **(Optional) Open the application settings**

   Select **Manage**. The settings of the application open in the Console. Later, you reach the same settings from the **Applications** page.

The application answers on its Azion domain. The first deploy can take several minutes to answer from every location. If the domain does not answer yet, wait a few minutes and retry.

If the deploy fails, the page shows **Creation failed**. The **Deploy Log** panel carries the details of the failure.

The repository stays connected after the import: every push to it deploys the application again. To serve the application on your own domain instead of the Azion domain, add a custom domain.

---

## Next steps

- [Manage the Azion GitHub App](/en/documentation/guides/application-development/automation/azion-github-app.md): Review the permissions and repository access the Azion GitHub App holds.
- [Add a custom domain to a workload](/en/documentation/guides/platform/migration/configure-a-domain.md): Serve the imported application on your own domain.
- [Applications quickstart](/en/documentation/platform/applications/quickstart.md): Manage the settings of the application you imported.
- [Azion CLI deploy](/en/documentation/devtools/cli/deploy.md): Build and deploy a project from your terminal instead.
