Skip to content

Commit

Permalink
feat: ✨ deploy github action 추가
Browse files Browse the repository at this point in the history
- close #356
  • Loading branch information
jpham005 committed Oct 13, 2023
1 parent 81bbacd commit 6a0f553
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy

on:
push:
branches:
- feat/deploy-pipeline

jobs:
deploy:
name: deploy
runs-on: ubuntu-22.04

env:
READ_PRIVATE_SUBMODULE_TOKEN: ${{ secrets.READ_PRIVATE_SUBMODULE_TOKEN }}
WORKING_DIRECTORY: ${{ vars.DEPLOY_WORKING_DIRECTORY }}
DEPLOY_FILENAME: ${{ vars.DEPLOY_FILENAME }}
S3_REGION: ${{ vars.S3_REGION }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: feat/deploy-pipeline
submodules: true
token: ${{ env.READ_PRIVATE_SUBMODULE_TOKEN }}

- name: Install aws cli
run: |
sudo apt-get update
sudo apt-get install awscli
- name: Deploy code to AWS S3
run: |
echo == ${{ env.AWS_ACCESS_KEY_ID }} ==
zip -r ${{ env.DEPLOY_FILENAME }} appspec.yml app env deploy-script
aws s3 cp ${{ env.DEPLOY_FILENAME }} s3://stat-ec2-app-code-deploy-bucket/${{ env.DEPLOY_FILENAME }} --region ${{ env.S3_REGION }}
working-directory: ${{ env.DEPLOY_WORKING_DIRECTORY }}

0 comments on commit 6a0f553

Please sign in to comment.