-
Notifications
You must be signed in to change notification settings - Fork 43
71 lines (60 loc) · 1.72 KB
/
cd.deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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