-
Notifications
You must be signed in to change notification settings - Fork 1
29 lines (28 loc) · 1.04 KB
/
deploy.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
name: CD Pipeline
on:
push:
branches: [ main ]
jobs:
continuous-deployment:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
# Step 1
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
# Step 2
- name: Create CodeDeploy Deployment
id: deploy
run: |
aws deploy create-deployment \
--application-name CodeDeploy-ICBOT \
--deployment-group-name CodeDeployICEBOT_GRP \
--deployment-config-name CodeDeployDefault.OneAtATime \
--description "Deployement for commit ${{ github.event.head_commit.message }}" \
--github-location repository=${{ github.repository }},commitId=${{ github.sha }} \
--ignore-application-stop-failures \
--file-exists-behavior "OVERWRITE"