-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (57 loc) · 1.72 KB
/
deploy_ap_EB.yml
File metadata and controls
61 lines (57 loc) · 1.72 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
58
59
60
61
name: AP Elastic Beanstalk deployment
on:
workflow_run:
workflows: ["Integration and code analysis"]
branches:
- main
- v1.1.0-preview.6
types:
- completed
jobs:
print-github-env:
name: print
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
run: |
echo ${{ github.event.workflow_run.conclusion }} &&
echo ${{ toJson(github) }}
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: Upload JAR
uses: actions/upload-artifact@v3
with:
name: artifact
path: target/answer-king-rest-api-1.1.0.jar
deploy-jar:
needs: upload-jar
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Download JAR
uses: actions/download-artifact@v3
with:
name: artifact
- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v21
with:
aws_access_key: ${{ secrets.AP_AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AP_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-1.1.0.jar