|  | 
| 11 | 11 |         options: | 
| 12 | 12 |           - preview | 
| 13 | 13 |           - production | 
| 14 |  | -  push: | 
| 15 |  | -    branches: [main] | 
|  | 14 | +  push: {} | 
| 16 | 15 |   pull_request: | 
| 17 |  | -    types: [opened, synchronize] | 
|  | 16 | +    types: [opened, synchronize, reopened, ready_for_review] | 
| 18 | 17 | 
 | 
| 19 | 18 | concurrency: | 
| 20 | 19 |   group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | 
| @@ -43,21 +42,21 @@ jobs: | 
| 43 | 42 |         run: pnpm expo export --platform web --output-dir ./build | 
| 44 | 43 | 
 | 
| 45 | 44 |       - 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' }} | 
| 47 | 46 |         working-directory: apps/example | 
| 48 |  | -        run: eas deploy --export-dir ./build --channel preview --non-interactive | 
|  | 47 | +        run: eas deploy --export-dir ./build --non-interactive | 
| 49 | 48 | 
 | 
| 50 | 49 |       - 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' }} | 
| 52 | 51 |         working-directory: apps/example | 
| 53 | 52 |         run: eas update --branch preview --message "CI publish for Expo Go (preview)" --non-interactive | 
| 54 | 53 | 
 | 
| 55 | 54 |       - 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' }} | 
| 57 | 56 |         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 | 
| 59 | 58 | 
 | 
| 60 | 59 |       - 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' }} | 
| 62 | 61 |         working-directory: apps/example | 
| 63 | 62 |         run: eas update --branch production --message "CI publish for Expo Go (production)" --non-interactive | 
0 commit comments