-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (45 loc) · 1.52 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: deploy
on:
workflow_dispatch:
inputs:
target:
description: Deploy as preview or production
type: choice
required: true
default: preview
options:
- preview
- production
push:
branches: [main]
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
env:
EXPO_USE_FAST_RESOLVER: true # Use the faster Metro resolver in SDK 51
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repository
uses: actions/checkout@v4
- name: 🏗 Setup monorepo
uses: ./.github/actions/setup-monorepo
with:
expo-token: ${{ secrets.EXPO_TOKEN }}
rxdb-license-key: ${{ secrets.RXDB_LICENSE_KEY }}
- name: ✅ Build apps/main
run: pnpm run -w build:main
- name: 🌐 Export apps/main for web
working-directory: apps/main
run: pnpm expo export --platform web --output-dir ./build
- name: 🚀 Deploy apps/main preview
if: ${{ github.event_name == 'pull_request' || github.event.inputs.target == 'preview' }}
working-directory: apps/main
run: eas deploy --export-dir ./build
- name: 🚀 Deploy apps/main production
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || github.event.inputs.target == 'production' }}
working-directory: apps/main
run: eas deploy --export-dir ./build --production