Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaeyeon1 authored Nov 28, 2023
1 parent 605f226 commit 986515d
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,22 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Build
working-directory: client
run: |
npm install
npm run build
- name: Deploy build outputs
uses: appleboy/scp-action@master
- name: Deploy
uses: appleboy/ssh-action@v1.0.0
with:
host: ${{ secrets.HOST }}
username: ubuntu
username: 'ubuntu'
key: ${{ secrets.PRIVATE_KEY }}
source: "build/*"
strip_components: 1
target: "/var/www/html/"
script: |
cd /home/ubuntu/app/GLOG
git pull origin develop
npm install
echo "Build!!"
npm run build
echo "Restart pm2!!"
pm2 kill
pm2 start "npm run start"
echo "Finished!!"

0 comments on commit 986515d

Please sign in to comment.