Created
January 13, 2022 01:14
-
-
Save reaperes/5eea77cbddbee860950311b17d97b93f to your computer and use it in GitHub Desktop.
Github deploy workflow vis CodeDeploy with github
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy main branch to production | |
on: | |
push: | |
branches: [ main ] | |
env: | |
DEPLOY_IAM_ROLE: arn:aws:iam::1234567890:role/deployer | |
GITHUB_REPOSITORY: org/repo | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Assume IAM role | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
role-to-assume: ${{ env.DEPLOY_IAM_ROLE }} | |
aws-region: ap-northeast-2 | |
- name: Create code deploy | |
run: aws deploy create-deployment --application-name app --deployment-group-name group --github-location repository=$GITHUB_REPOSITORY,commitId=$GITHUB_SHA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment