1---
2title: Trigger builds from the Expo GitHub App
3sidebar_title: Trigger builds from GitHub App
4description: Learn how to trigger builds on EAS for your app using the Expo GitHub App.
5---
6
7import ImageSpotlight from '~/components/plugins/ImageSpotlight';
8
9You can trigger builds on EAS for your app from a CI environment such as GitHub Actions, Travis CI, and more.
10
11Before building with EAS on CI, you'll need to install and configure `eas-cli`. Then, you can trigger new builds with the `eas build` command.
12
13## Prerequisites
14
15> **warning** While in preview, this feature is only available to EAS subscribers.
16
17### Run a successful build from your local machine
18
19To trigger EAS builds from a GitHub repo, you'll need to configure your project for EAS Build and successfully run a build from your computer for each platform that you'd like to support on GitHub.
20
21If you have run `eas build -p [all|ios|android]` successfully before, then you can continue. If you haven't done this yet, refer to the [Create your first build](setup.mdx) and return here when ready.
22
23## Configure your app for GitHub
24
25### Link your GitHub repository to your Expo project
26
27Visit your project's [GitHub settings
28page](https://expo.dev/accounts/[account]/projects/[projectName]/github).
29
30<ImageSpotlight
31  alt="The project GitHub settings page"
32  src="/static/images/eas-build/build-from-github/project-github-page.png"
33/>
34
35Install the Expo GitHub App on your GitHub account.
36
37<ImageSpotlight
38  alt="The GitHub app installation UI"
39  src="/static/images/eas-build/build-from-github/install-github-app.png"
40/>
41
42Link your GitHub account to your Expo account.
43
44> **Note:** You must be an admin of the Expo account to install the app. Also, You can only link GitHub
45> organizations to Expo organizations.
46
47<ImageSpotlight
48  alt="The GitHub account linking UI"
49  src="/static/images/eas-build/build-from-github/link-github-account.png"
50/>
51
52Then, you'll be able to link your repository to your Expo project.
53
54<ImageSpotlight
55  alt="The repository selector on the Expo project GitHub settings page"
56  src="/static/images/eas-build/build-from-github/connect-a-repository.png"
57/>
58
59### Configure your repository settings
60
61Before you run a build, the Expo GitHub App needs to know where to find the source code for your project. If your Expo
62project source code is in the root of your repository, then you don't need to do anything. If your
63Expo project source code is in a subdirectory, then you'll need to configure "Base directory"
64settings for your repository on your project's [GitHub settings
65page](https://expo.dev/accounts/[account]/projects/[projectName]/github).
66
67<ImageSpotlight
68  alt="The base directory input on the Expo project GitHub settings page"
69  src="/static/images/eas-build/build-from-github/specify-base-directory.png"
70/>
71
72## Trigger a build from GitHub
73
74Once you've configured your app for GitHub, you can trigger a build from GitHub by using the UI on
75your project's build list page or by labels on your GitHub PRs.
76
77### Build using the Expo website
78
79Visit your project's [build list
80page](https://expo.dev/accounts/[account]/projects/[projectName]/builds) and click the "Build from
81GitHub" button. You'll be prompted to select a Git ref (branch/commit/tag), a platform to build
82for, and the build profile to apply to it.
83
84You can also specify a base directory for this specific build. That will not change the global
85settings for this project.
86
87<ImageSpotlight
88  alt="The build from GitHub UI on the Expo project builds list page"
89  src="/static/images/eas-build/build-from-github/github-build-ui.png"
90/>
91
92### Build using GitHub PR labels
93
94You can trigger a build from a GitHub PR by adding a label to the PR. The label must be in the form
95of `eas-build-[platform]:[profile]` where `[platform]` is either `android`, `ios`, or `all` and
96`[profile]` is the name of a build profile specified in your **eas.json** file. If you don't specify
97a build platform, it will default to `all`. If you don't speficy
98a build profile, it will default to `production`.
99
100For example, if
101you want to trigger a production build for Android, add the label `eas-build-android` to the PR.
102
103<ImageSpotlight
104  alt="A PR with the eas-build label and live status checks"
105  src="/static/images/eas-build/build-from-github/eas-build-label.png"
106/>
107
108The build will be triggered for the latest commit on the PR's base branch. You can view the status
109of the build in the PR's checks. A link to the build will be available in the check's details.
110
111<ImageSpotlight
112  alt="EAS Build check details on a GitHub PR"
113  src="/static/images/eas-build/build-from-github/gh-check-details.png"
114/>
115