This repository has been archived by the owner on Feb 8, 2025. It is now read-only.
Merge pull request #187 from zallo-labs/Z-215-activation #123
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 120 | |
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: 2 | |
- 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: | |
# environment: main - docs | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: π Deploy | |
# uses: fjogeleit/http-request-action@v1 | |
# with: | |
# url: ${{ secrets.DEPLOY_HOOK }} | |
# method: POST |