Skip to content

Commit

Permalink
[HOTFIX] 원격 서버에 Runner 생성 파일 전송 Step 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yummygyudon committed Dec 29, 2024
1 parent 34b5b8f commit ac5bcfd
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/cd-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ jobs:
aws s3 cp --region $REGION \
s3://$S3_BUCKET/dev/static/$APPLE_KEY ./$APPLE_KEY_NAME
- name: 🔄 Transfer Files to Server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST_DEV }}
username: ubuntu
key: ${{ secrets.PEM_KEY_DEV }}
port: 22
source: |
deploy.sh
switch.sh
valid.sh
application.env
${{ secrets.APPLE_KEY_NAME }}
target: /home/ubuntu/deploy-temp/op

- name: 🚀SSH command deploy
uses: appleboy/ssh-action@master
with:
Expand All @@ -82,18 +97,18 @@ jobs:
mkdir -p /home/ubuntu/property/op
mkdir -p /home/ubuntu/env/op
echo $(cat deploy.sh) > /home/ubuntu/script/op/deploy.sh
echo $(cat switch.sh) > /home/ubuntu/script/op/switch.sh
echo $(cat valid.sh) > /home/ubuntu/script/op/valid.sh
echo $(cat application.env) > /home/ubuntu/env/op/application.env
echo $(cat ${{ secrets.APPLE_KEY_NAME }}) > /home/ubuntu/property/op/key/${{ secrets.APPLE_KEY_NAME }}
mv /home/ubuntu/deploy-temp/op/deploy.sh /home/ubuntu/script/op/deploy.sh
mv /home/ubuntu/deploy-temp/op/switch.sh /home/ubuntu/script/op/switch.sh
mv /home/ubuntu/deploy-temp/op/valid.sh /home/ubuntu/script/op/valid.sh
mv /home/ubuntu/deploy-temp/op/application.env /home/ubuntu/env/op/application.env
mv /home/ubuntu/deploy-temp/op/${{ secrets.APPLE_KEY_NAME }} /home/ubuntu/property/op/key/${{ secrets.APPLE_KEY_NAME }}
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
sudo chmod +r /home/ubuntu/property/op/key/${{ secrets.APPLE_KEY }}
./home/ubuntu/script/op/deploy.sh
./home/ubuntu/script/op/switch.sh
./home/ubuntu/script/op/valid.sh
/home/ubuntu/script/op/deploy.sh
/home/ubuntu/script/op/switch.sh
/home/ubuntu/script/op/valid.sh

0 comments on commit ac5bcfd

Please sign in to comment.