Skip to content

Commit

Permalink
Fix: docker-compose.yml 경로를 루트로 압축할수있도록
Browse files Browse the repository at this point in the history
  • Loading branch information
BYEONGRYEOL committed Aug 7, 2024
1 parent fbf0b06 commit 570a44e
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/cicd-ec2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,22 @@ jobs:
- name: Upload docker-compose, appspec, afterInstall file to S3
if: contains(github.ref, 'main')
run: |
zip -r ./$GITHUB_SHA.zip ./scripts appspec.yml docker-compose.yml .env
# Create a temporary directory for the zip contents
mkdir -p temp_dir/scripts
cp -r ./scripts/* temp_dir/scripts/
cp appspec.yml temp_dir/
cp ./docker/deploy/docker-compose.yml temp_dir/docker-compose.yml
# Navigate to the temporary directory and create the zip file
cd temp_dir
zip -r ../$GITHUB_SHA.zip ./*

# Move back to the initial directory and upload the zip file to S3
cd ..
aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$S3_BUCKET_NAME

# Clean up the temporary directory
rm -rf temp_dir

- name: Upload docker compose file to staging server
if: contains(github.ref, 'staging')
Expand Down

0 comments on commit 570a44e

Please sign in to comment.