-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.46 KB
/
deploy.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
name: deploy
on:
push:
branched:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup jdk 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'
- name: Make application.yml
run: |
touch ./src/main/resources/application.yml
echo "${{ secrets.APPLICATION_YML }} > ./application.yml
- name: Grant execute permission for gradleqw
run: chmod +x ./gradlew
shell: bash
- name: Build with gradle
run: ./gradlew clean build
shell: bash
- name: Get current time
uses: josStorer/get-current-time@v2
id: current-time
with:
format: YYYY-MM-DDTHH-mm-ss
utcOffset: "+09:00"
- name: Generate deployment package
run: |
mkdir -p deploy
cp build/libs/*.jar deploy/application.jar
cd deploy && zip -r deploy.zip .
- uses: einaregilsson/beanstalk-deploy@v22
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }}
aws_secret_key: ${{ secrets.AWS_SECRET_KEY }}
application_name: SESEO2
environment_name: SESEO2-env
version_label: github-acion-${{ steps.current-time.outputs.formattedTime }}
region: ap-northeast-2
deployment_package: deploy/deploy.zip
wait_for_environment_recovery: 60