-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (40 loc) · 1.47 KB
/
aws_deploy.yaml
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
name: Deploy master
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
- name: Create firebase-adminsdkjson from secrets
id: write_firebase-adminsdkjson
uses: timheuer/base64-to-file@v1.1
with:
fileName: 'firebase-adminsdk.json'
fileDir: '/Users/runner/work/HarvestCloneAPI/HarvestCloneAPI/src/main/resources/'
encodedString: ${{ secrets.FIREBASEADMINSDK }}
- name: Generate deployment package
run: ./mvnw clean && ./mvnw install
- name: Declare some variables
id: vars
shell: bash
run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Another step
run: |
echo "Branch: ${{ steps.vars.outputs.branch }}"
echo "Sha: ${{ steps.vars.outputs.sha_short }}"
- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v16
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: mmharvestkmp
environment_name: mmharvestkmp-env
version_label: "${{ steps.vars.outputs.branch }}.${{ steps.vars.outputs.sha_short }}"
region: us-east-2
deployment_package: target/mmharvestkmp-0.0.1-SNAPSHOT.war