Skip to content

Commit

Permalink
[CHORE] dev 서버 통합에 따른 스크립트 변경
Browse files Browse the repository at this point in the history
note: 임시 스크립트 실행이므로 deploy 스크립트 수정 이후 다시 s3로부터 가져올 수 있도록 반영해야 합니다
  • Loading branch information
sung-silver authored Jan 14, 2025
1 parent 42982c2 commit 7dcae98
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions .github/workflows/cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,7 @@ jobs:
env:
REGION: ${{ secrets.AWS_REGION }}
S3_BUCKET: ${{ secrets.AWS_BUCKET_NAME }}
run: |
aws s3 cp --region $REGION \
s3://$S3_BUCKET/dev/script/deploy.sh ./deploy.sh
aws s3 cp --region $REGION \
s3://$S3_BUCKET/dev/script/switch.sh ./switch.sh
aws s3 cp --region $REGION \
s3://$S3_BUCKET/dev/script/valid.sh ./valid.sh
run:
aws s3 cp --region $REGION \
s3://$S3_BUCKET/dev/dev.env ./application.env

Expand All @@ -74,8 +67,8 @@ jobs:
username: ubuntu
key: ${{ secrets.PEM_KEY_DEV }}
port: 22
source: "deploy.sh,switch.sh,valid.sh,application.env"
target: /home/ubuntu/deploy-temp/op
source: "application.env"
target: /home/ec2-user/operation/env

- name: 🚀SSH command deploy
uses: appleboy/ssh-action@master
Expand All @@ -85,20 +78,4 @@ jobs:
key: ${{ secrets.PEM_KEY_DEV }}
port: 22
script: |
mkdir -p /home/ubuntu/script/op
mkdir -p /home/ubuntu/property/op
mkdir -p /home/ubuntu/env/op
sudo mv /home/ubuntu/deploy-temp/op/deploy.sh /home/ubuntu/script/op/deploy.sh
sudo mv /home/ubuntu/deploy-temp/op/switch.sh /home/ubuntu/script/op/switch.sh
sudo mv /home/ubuntu/deploy-temp/op/valid.sh /home/ubuntu/script/op/valid.sh
sudo mv /home/ubuntu/deploy-temp/op/application.env /home/ubuntu/env/op/application.env
sudo chmod +x /home/ubuntu/script/op/deploy.sh
sudo chmod +x /home/ubuntu/script/op/switch.sh
sudo chmod +x /home/ubuntu/script/op/valid.sh
sudo chmod +r /home/ubuntu/env/op/application.env
/home/ubuntu/script/op/deploy.sh
/home/ubuntu/script/op/switch.sh
/home/ubuntu/script/op/valid.sh
/home/ec2-user/operation/scripts/deploy.sh

0 comments on commit 7dcae98

Please sign in to comment.