Merge pull request #1093 from overthq/validation-and-polish #29
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: | |
push: | |
branches: | |
- main | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
outputs: | |
app: ${{ steps.filter.outputs.app }} | |
dashboard: ${{ steps.filter.outputs.dashboard }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
app: | |
- 'apps/app/**' | |
dashboard: | |
- 'apps/dashboard/**' | |
deploy-app: | |
needs: changes | |
if: ${{ needs.changes.outputs.app == 'true' }} | |
name: Deploy app | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
- name: Install dependencies | |
run: pnpm i --frozen-lockfile | |
- name: Setup Expo | |
uses: expo/expo-github-action@v8 | |
with: | |
packager: pnpm | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: Build and deploy | |
run: eas build -p android --profile=production --auto-submit --non-interactive --no-wait | |
working-directory: ./apps/app | |
deploy-dashboard: | |
needs: changes | |
if: ${{ needs.changes.outputs.dashboard == 'true' }} | |
name: Deploy dashboard | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
- name: Install dependencies | |
run: pnpm i --frozen-lockfile | |
- name: Setup Expo | |
uses: expo/expo-github-action@v8 | |
with: | |
packager: pnpm | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: Build and deploy | |
run: eas build -p android --profile=production --auto-submit --non-interactive --no-wait | |
working-directory: ./apps/dashboard |