This repository has been archived by the owner on Feb 8, 2025. It is now read-only.
Merge pull request #294 from zallo-labs/Z-346-invalid-cloud-approver-… #231
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: Deployment | |
on: | |
push: | |
branches: [main] | |
concurrency: | |
group: deployment-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
jobs: | |
api: | |
environment: main - api | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🚧 Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: 🚧 Setup Fly | |
uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: 🚀 Deploy | |
run: > | |
flyctl deploy . --config api/fly.toml | |
--remote-only | |
--wait-timeout 180 | |
--build-arg TURBO_TOKEN=$TURBO_TOKEN | |
--build-arg TURBO_TEAM=$TURBO_TEAM | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
api-sentry-release: | |
environment: main - api | |
runs-on: ubuntu-latest | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
steps: | |
- name: 🚧 Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 200 # Sentry looks for the previous release in the git history | |
- name: 📦 Install | |
run: yarn | |
- name: 🏗️ Build | |
run: yarn api build | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
with: | |
working_directory: './api' | |
sourcemaps: './dist' | |
app-native: | |
environment: main - app | |
runs-on: ubuntu-latest | |
env: | |
DOTENV_KEY: ${{ secrets.DOTENV_KEY }} | |
NODE_OPTIONS: '--max-old-space-size=4096' | |
steps: | |
- name: 🚧 Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 200 # Sentry looks for the previous release in the git history | |
- name: 🚧 Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'yarn' | |
node-version-file: '.nvmrc' | |
- name: 🚧 Setup Expo | |
uses: expo/expo-github-action@v8 | |
with: | |
token: ${{ secrets.EXPO_TOKEN }} | |
eas-version: latest | |
- name: 📦 Install | |
run: yarn | |
# Updates iOS and Android; web app is deployed via Vercel | |
- name: 🚀 Publish update | |
run: yarn app deploy:update | |
# Docs deployed via Vercel |