Skip to content

Merge pull request #591 from dzcode-io/rspack #13

Merge pull request #591 from dzcode-io/rspack

Merge pull request #591 from dzcode-io/rspack #13

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: [20.x]
os: [ubuntu-latest]
env:
CI: true
STAGE: production
SSH_ADDRESS_PRD: ${{ secrets.SSH_ADDRESS_PRD }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
DEPLOY_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || format('0.0.0-{0}-{1}-{2}', github.ref_name, github.run_number, github.run_attempt) }}
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: "Install"
shell: bash
run: |
yarn --frozen-lockfile --network-timeout 1000000
- name: "Version"
shell: bash
run: |
yarn version:apply $DEPLOY_VERSION
yarn version:push $DEPLOY_VERSION
- name: "Bundle info"
shell: bash
run: |
yarn generate:bundle-info $DEPLOY_VERSION production
- name: "Build"
shell: bash
run: |
yarn build
yarn --cwd=web bundle:alone
- name: "Sentry Release"
shell: bash
run: |
yarn generate:sentry-release $DEPLOY_VERSION production ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: "Deploy"
shell: bash
run: |
yarn deploy