-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (48 loc) · 1.34 KB
/
be-cd-dev.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
name: BE CD for Dev
on:
workflow_dispatch:
push:
branches: [ "develop" ]
paths:
- backend/**
jobs:
build:
timeout-minutes: 2
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setting dev-secret.yml
run: |
echo "${{ secrets.DEV_SECRET_YML }}" > ./src/main/resources/dev-secret.yml
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: bootJar with Gradle
run: ./gradlew bootJar -PcreateRestDocs
- name: Change artifact file name
run: mv build/libs/*.jar build/libs/app.jar
- name: Upload artifact file
uses: actions/upload-artifact@v4
with:
name: app-artifact
path: ./backend/build/libs/app.jar
deploy:
needs: build
timeout-minutes: 2
runs-on: [ dev, X64, Linux ]
steps:
- name: Download artifact file
uses: actions/download-artifact@v4
with:
name: app-artifact
path: ~/app
- name: Replace application to latest
run: sudo sh ~/scripts/replace-new-version.sh
- name: Health check latest application
run: sudo sh ~/scripts/health-check.sh