-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 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
30
31
32
33
34
35
name: Deploy to AWS CodeDeploy
on:
push:
branches:
- main # Adjust this to your deployment branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install AWS CLI
run: |
sudo apt-get update
sudo apt-get install -y unzip
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install
chmod +x ./install
sudo ./install auto
- name: Deploy to AWS CodeDeploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
run: |
aws deploy create-deployment \
--application-name charcha \
--deployment-group-name group \
--deployment-config-name CodeDeployDefault.OneAtATime \
--description "Deployment from GitHub Actions" \
--github-location repository=${{ github.repository }},commitId=${{ github.sha }}