Skip to content

Update main.yml

Update main.yml #2

Workflow file for this run

name: Deploy to Server
# main 브랜치로 푸시할 때 이 워크플로우 실행
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# GitHub에서 리포지토리 코드를 가져오는 단계
- name: Checkout code
uses: actions/checkout@v2
# 서버로 SSH 연결을 통한 배포
- name: Deploy to server via SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
cd ./ArWebAuth/
git pull origin master
npm install
pm2 restart www