Skip to content

Merge pull request #2 from SPARCS-Service-Hackathon-2024/feature/chat #10

Merge pull request #2 from SPARCS-Service-Hackathon-2024/feature/chat

Merge pull request #2 from SPARCS-Service-Hackathon-2024/feature/chat #10

Workflow file for this run

name: sarabwayu
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # 원하는 Node.js 버전을 지정하세요
- name: Install Dependencies
run: npm install
- name: Build Project
run: npm run build
- name: Deploy to Server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.NCP_HOST }}
username: ${{ secrets.NCP_USER }}
password: ${{ secrets.NCP_PASSWORD }}
source: "./build/*"
target: "/sarabwayu"
- name: Restart Web Server (Optional)
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.NCP_HOST }}
username: ${{ secrets.NCP_USER }}
password: ${{ secrets.NCP_PASSWORD }}
script: |
sudo systemctl restart nginx