Skip to content

Merge pull request #97 from Clubber2024/feat/recruit-content-page #68

Merge pull request #97 from Clubber2024/feat/recruit-content-page

Merge pull request #97 from Clubber2024/feat/recruit-content-page #68

Workflow file for this run

name: Build, Test, and Deploy
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build project
run: |
CI=false npm run build
- name: Deploy to Remote Server
if: success()
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
source: 'build/*'
target: '/home/ubuntu/client/Clubber-Client'
- name: SSH Remote Commands
if: success()
uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
cd /var/www/html
# 여기에 원격 서버에서 실행할 명령어를 추가
# ex) 서비스 재시작:
sudo systemctl restart nginx