Merge branch 'main' of https://github.com/gsp-kmu/server #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: AWS CI/CD | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
deploy: | |
name: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: build | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.AWS_HOST }} | |
username: ${{ secrets.AWS_USERNAME }} | |
key: ${{ secrets.AWS_KEY }} | |
port: ${{ secrets.AWS_PORT }} | |
script: | | |
cd GSP | |
git pull origin main | |
pm2 kill | |
npm i | |
pm2 start --name "app.js" npm -- start |