Skip to content

Commit

Permalink
fix: Github Actions Worflow 수정
Browse files Browse the repository at this point in the history
배포 workflow의 env 변수 사용이 잘못되었던 부분을 수정하였습니다.
  • Loading branch information
JYKIM317 committed Nov 29, 2024
1 parent f8ebbea commit 45394b9
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ jobs:
SERVER_HOST: ${{ secrets.FUNCH_HOST }}
SERVER_USER: ${{ secrets.FUNCH_USER }}
run: |
echo "${FUNCH_SSH_KEY}" > deploy_key
echo "${SSH_PRIVATE_KEY}" > deploy_key
chmod 600 deploy_key
ssh -i deploy_key ${{ secrets.FUNCH_USER }}@${{ secrets.FUNCH_HOST}}
cd /root/web25-funch
git switch main
git pull origin main
pm2 reload ecosystem.config.js
ssh -i deploy_key "${SERVER_USER}"@"${SERVER_HOST}" << EOF
cd /root/web25-funch
git switch main
git pull origin main
pm2 reload ecosystem.config.js
EOF
media-deploy:
runs-on: ubuntu-latest
Expand All @@ -32,11 +33,12 @@ jobs:
SERVER_HOST: ${{ secrets.MEDIA_HOST }}
SERVER_USER: ${{ secrets.MEDIA_USER }}
run: |
echo "${MEDIA_SSH_KEY}" > deploy_key
echo "${SSH_PRIVATE_KEY}" > deploy_key
chmod 600 deploy_key
ssh -i deploy_key ${{ secrets.MEDIA_USER }}@${{ secrets.MEDIA_HOST}}
git switch main
cd /service/web25-funch
git pull origin main
cd mediaServer
pm2 reload ecosystem.config.js
ssh -i deploy_key "${SERVER_USER}"@"${SERVER_HOST}" << EOF
cd /service/web25-funch
git switch main
git pull origin main
cd mediaServer
pm2 reload ecosystem.config.js
EOF

0 comments on commit 45394b9

Please sign in to comment.