Skip to content

Merge pull request #582 from dzcode-io/chore/fix-api-deployment #9

Merge pull request #582 from dzcode-io/chore/fix-api-deployment

Merge pull request #582 from dzcode-io/chore/fix-api-deployment #9

Workflow file for this run

name: Deploy To Production Environment
on:
push:
tags:
- "v*"
jobs:
install-build-deploy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x]
os: [ubuntu-latest]
env:
CI: true
STAGE: production
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS }}
SSH_ADDRESS_PRD: ${{ secrets.SSH_ADDRESS_PRD }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
steps:
- name: "Git"
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_ZAK_PAT }}
- name: "SSH"
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: "Nodejs"
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- name: "Expo"
uses: expo/expo-github-action@v8
with:
expo-version: 4.x
token: ${{ secrets.EXPO_TOKEN }}
- name: "Install"
shell: bash
run: |
yarn --frozen-lockfile --network-timeout 1000000
- name: "Version"
shell: bash
run: |
yarn version:apply ${{ github.ref_name }}
yarn version:push ${{ github.ref_name }}
- name: "Bundle info"
shell: bash
run: |
yarn generate:bundle-info ${{ github.ref_name }} production
- name: "Build"
shell: bash
run: |
yarn build
yarn --cwd=web bundle:alone
- name: "Sentry Release"
shell: bash
run: |
yarn generate:sentry-release ${{ github.ref_name }} production ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: "Deploy"
shell: bash
run: |
yarn deploy