fix(example): use proper build:example
in EAS post install hook
#12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
example: | |
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 }} | |
- name: ✅ Build apps/example | |
run: pnpm run -w build:example | |
- name: 🌐 Export apps/example for web | |
working-directory: apps/example | |
run: pnpm expo export --platform web --output-dir ./build | |
# Remove this step and configure the app to contain your own project and bundle identifiers. | |
# This is intentionally omitted in the template repository to guide users through the setup when cloning. | |
- name: 👷 Configure project | |
if: ${{ github.repository == 'byCedric/expo-monorepo-example' }} | |
working-directory: apps/example | |
run: eas init --id d202a56f-0162-450d-af3b-a2d2e0678594 --force --non-interactive | |
- name: 🚀 Deploy apps/example preview | |
if: ${{ github.event_name == 'pull_request' || github.event.inputs.target == 'preview' }} | |
working-directory: apps/example | |
run: eas deploy --export-dir ./build | |
- name: 🚀 Deploy apps/example production | |
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || github.event.inputs.target == 'production' }} | |
working-directory: apps/example | |
run: eas deploy --export-dir ./build --production |