-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.36 KB
/
deploy-dev-api.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
# API - Dev Server에 배포
name: API - Deploy Development Environment
on:
push:
branches:
- release/Api-v*
- hotfix/Api-v*
env:
AWS_REGION: ap-northeast-2
DEV_RUN: false
jobs:
dev-api-server-deploy:
if: ${{ env.DEV_RUN }}
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
token: ${{ secrets.MY_TOKEN }}
submodules: true
# JDK 환경 셋팅
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
cache: gradle
# Gradle Permission
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# Build
- name: Gradle build
run: |
./gradlew globalCopyConfig
./gradlew adevspoon-api:build -x test
# AWS Config
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ env.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# Deploy to Lambda
- name: Deploy to lambda
run: |
# aws lambda update-function-code --function-name adevspoon-api --zip-file fileb://adevspoon-api/build/libs/adevspoon-api-*.jar