Skip to content

Commit 0a1cd44

Browse files
committed
Update deploy.yml
1 parent c64f3a6 commit 0a1cd44

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ on:
1111
options:
1212
- preview
1313
- production
14-
push:
15-
branches: [main]
14+
push: {}
1615
pull_request:
17-
types: [opened, synchronize]
16+
types: [opened, synchronize, reopened, ready_for_review]
1817

1918
concurrency:
2019
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
@@ -43,21 +42,21 @@ jobs:
4342
run: pnpm expo export --platform web --output-dir ./build
4443

4544
- name: 🚀 Deploy web (preview)
46-
if: ${{ github.event_name == 'pull_request' || github.event.inputs.target == 'preview' }}
45+
if: ${{ github.event_name == 'pull_request' || github.event.inputs.target == 'preview' || github.ref != 'refs/heads/main' }}
4746
working-directory: apps/example
48-
run: eas deploy --export-dir ./build --channel preview --non-interactive
47+
run: eas deploy --export-dir ./build --non-interactive
4948

5049
- name: 🚀 Publish to Expo Go (preview)
51-
if: ${{ github.event_name == 'pull_request' || github.event.inputs.target == 'preview' }}
50+
if: ${{ github.event_name == 'pull_request' || github.event.inputs.target == 'preview' || github.ref != 'refs/heads/main' }}
5251
working-directory: apps/example
5352
run: eas update --branch preview --message "CI publish for Expo Go (preview)" --non-interactive
5453

5554
- name: 🚀 Deploy web (production)
56-
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || github.event.inputs.target == 'production' }}
55+
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event.inputs.target == 'production' }}
5756
working-directory: apps/example
58-
run: eas deploy --export-dir ./build --channel production --non-interactive --production
57+
run: eas deploy --export-dir ./build --non-interactive --production
5958

6059
- name: 🚀 Publish to Expo Go (production)
61-
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || github.event.inputs.target == 'production' }}
60+
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event.inputs.target == 'production' }}
6261
working-directory: apps/example
6362
run: eas update --branch production --message "CI publish for Expo Go (production)" --non-interactive

0 commit comments

Comments
 (0)