-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.39 KB
/
main.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
name: Deploy to AWS/EBS
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Building application
run: npm install
- name: Generate deployment package
run: zip -r deploy.zip * -x "**node_modules**"
- name: Get timestamp
uses: gerred/actions/current-time@master
id: current-time
- name: Run string replace
uses: frabert/replace-string-action@master
id: format-time
with:
pattern: '[:\.]+'
string: "${{ steps.current-time.outputs.time }}"
replace-with: '-'
flags: 'g'
- name: Beanstalk Deploy for app
uses: einaregilsson/beanstalk-deploy@v10
with:
aws_access_key: ${{secrets.AWS_ACCESS_KEY_ID}}
aws_secret_key: ${{secrets.AWS_SECRET_ACCESS_KEY}}
application_name: ISDCF-Registry-Server
environment_name: ISDCF-Registry-Server-env
region: us-east-2
version_label: "isdcf-registry-server-${{ steps.format-time.outputs.replaced }}"
version_description: ${{github.SHA}}
deployment_package: deploy.zip
- name: Deployed!
run: echo Successfully deployed to AWS ELB