forked from answerdigital/AnswerKing-Java
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (55 loc) · 1.63 KB
/
deploy.yml
File metadata and controls
57 lines (55 loc) · 1.63 KB
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: AP Elastic Beanstalk deployment
on:
workflow_run:
workflows: ["Integration and code analysis"]
branches:
- main
- master
- develop
- v1.1.0-preview.3
types:
- completed
status:
- success
jobs:
upload-jar:
name: Build
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
cache: 'maven'
- name: Build with Maven
run: mvn -B package -DskipTests --file pom.xml
- name: Print contents of target directory
run: ls target -lt
- name: Upload JAR
uses: actions/upload-artifact@v2
with:
name: artifact
path: target/answer-king-rest-api-0.0.1.jar
deploy-jar:
needs: upload-jar
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Download JAR
uses: actions/download-artifact@v2
with:
name: artifact
- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v13
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
use_existing_version_if_available: true
application_name: answerKing-java
environment_name: Answerkingjava-env
version_label: ${{github.SHA}}
region: eu-west-2
deployment_package: answer-king-rest-api-0.0.1.jar