-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (37 loc) · 975 Bytes
/
deploy-prod-fe.yml
File metadata and controls
41 lines (37 loc) · 975 Bytes
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
name: Deploy FE to Prodction Top Mezon AI
on:
push:
branches:
- main
paths:
- 'frontend/**'
- '.github/workflows/deploy-prod-fe.yml'
jobs:
deploy:
runs-on: top-prod
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache Node Module
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: |
**/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json,**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Update Env-Config
run: |
cd frontend/
echo '${{ secrets.ENV_PROD_FE }}' > .env
- name: Build FE & Deploy
run: |
cd frontend/
yarn
yarn build
cp -r dist/* /var/www/top-mezon-ai/