Skip to content

Commit a12a642

Browse files
This commit refactors the GitHub Actions workflow to create previews for pull requests using Expo Application Services (EAS).
- The workflow is now triggered on `pull_request`. - It uses the `expo/expo-github-action` to simplify the setup of the Expo environment. - The build step has been changed from `eas build` to `eas update` to create a preview of the changes, which is faster and more efficient for reviewing pull requests. - The workflow file has been renamed to `preview.yml` to better reflect its purpose.
1 parent f29d3ac commit a12a642

File tree

2 files changed

+32
-48
lines changed

2 files changed

+32
-48
lines changed

.github/workflows/android-build.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/preview.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Create EAS Preview
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
preview:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: 18
17+
18+
- name: Setup EAS
19+
uses: expo/expo-github-action@v8
20+
with:
21+
eas-version: latest
22+
token: ${{ secrets.EXPO_TOKEN }}
23+
24+
- name: Install dependencies
25+
run: npm install
26+
working-directory: ./frontend
27+
28+
- name: Create preview
29+
uses: expo/expo-github-action/preview@v8
30+
with:
31+
command: eas update --auto --branch ${{ github.event.pull_request.head.ref }}
32+
working-directory: ./frontend

0 commit comments

Comments
 (0)