-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.34 KB
/
ci.yaml
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
name: Continuous Integration
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Install dependencies and Build app
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Set Node.js 20.13.1
uses: actions/setup-node@v4
with:
node-version: 20.13.1
cache: yarn
- run: yarn install
- run: yarn prepare
- run: yarn lint
- run: yarn build
deploy_dev:
needs:
- build
if: github.ref == 'refs/heads/develop'
name: Deploy Dev
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Deploy
uses: appleboy/[email protected]
with:
host: ${{vars.DEPLOY_SSH_HOST}}
username: ${{vars.DEPLOY_SSH_USERNAME}}
key: ${{secrets.DEPLOY_SSH_KEY_DEV}}
port: 2222
script: |
echo -n 'Deployment started at: ' &&
date -u &&
cd ${{vars.DEPLOY_SSH_PATH}} &&
git fetch &&
git pull -f origin develop &&
cd .. &&
docker compose --profile "*" build frontend &&
docker compose up -d frontend &&
echo -n 'Deployment completed at: ' &&
date -u