-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (43 loc) · 1.18 KB
/
cd.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
name: Continuous Delivery
env:
AWS_REGION: eu-central-1
EBS_APPLICATION_NAME: guru-hub
on:
push:
branches:
- development
- production
paths:
- frontend/**/*.*
- backend/**/*.*
- shared/**/*.*
- .github/workflows/cd.yml
- .ebextensions/**/*.*
- .platform/**/*.*
workflow_dispatch:
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: false
jobs:
cd:
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v3
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- name: Prepare deployment pkg
run: |
zip -r build.zip . -x mobile .github
- name: Deploy to EBS
uses: einaregilsson/beanstalk-deploy@v20
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: ${{ env.AWS_REGION }}
application_name: ${{ env.EBS_APPLICATION_NAME }}
environment_name: ${{ github.ref_name }}
version_label: ${{ github.sha }}
deployment_package: ./build.zip