Skip to content

Commit

Permalink
add: Github Actions CI/CD 관련 파일 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
pandahwang committed Oct 1, 2024
1 parent cd309ba commit 786c9e7
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy Frontend To EC2

on:
push:
branches:
- dev

jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: SSH(원격 접속)로 EC2에 접속하기
uses: appleboy/[email protected]
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
script_stop: true
script: |
cd /home/ubuntu/la-front-end
git pull origin dev
rm -rf build
npm install
npm run build
sudo fuser -k -n tcp 3000 || true
npx serve -s build -l 3000 > ./front_output.log 2>&1 &

0 comments on commit 786c9e7

Please sign in to comment.