Skip to content

Commit 52a7c50

Browse files
committed
build& env 생성 합치기
1 parent 4a19d0d commit 52a7c50

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ on:
77
jobs:
88
backend:
99
name: Deploy Backend to EC2
10-
needs: frontend
11-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-22.04
1211

1312
steps:
1413
- name: Checkout repository
@@ -20,18 +19,15 @@ jobs:
2019
distribution: 'temurin'
2120
java-version: '17'
2221

23-
- name: Create .env file
22+
- name: Create .env file& Build backend
2423
run: |
24+
cd backend/pirocheck
2525
echo DB_HOST=${{ secrets.DB_HOST }} >> .env
2626
echo DB_PORT=${{ secrets.DB_PORT }} >> .env
2727
echo DB_NAME=${{ secrets.DB_NAME }} >> .env
2828
echo DB_USER=${{ secrets.DB_USER }} >> .env
2929
echo DB_PASSWORD=${{ secrets.DB_PASSWORD }} >> .env
30-
working-directory: backend/pirocheck
3130
32-
- name: Build backend
33-
run: |
34-
cd backend/pirocheck
3531
chmod +x gradlew
3632
./gradlew build --no-daemon
3733
@@ -78,6 +74,7 @@ jobs:
7874
7975
frontend:
8076
name: Deploy Frontend to S3
77+
needs: backend
8178
runs-on: ubuntu-22.04
8279

8380
steps:

0 commit comments

Comments
 (0)