Skip to content

Delete cert directory and certifications #12

Delete cert directory and certifications

Delete cert directory and certifications #12

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
env:
SERVER_HOST: ${{secrets.SERVER_HOST}}
SERVER_USER: ${{secrets.SERVER_USER}}
SERVER_SSH_KEY: ${{secrets.SERVER_SSH_KEY}}
if: ${{env.SERVER_HOST && env.SERVER_USER && env.SERVER_SSH_KEY}} # Secret이 존재할 때만 실행
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
- name: Skip deployment in fork
env:
SERVER_HOST: ${{secrets.SERVER_HOST}}
SERVER_USER: ${{secrets.SERVER_USER}}
SERVER_SSH_KEY: ${{secrets.SERVER_SSH_KEY}}
if: ${{env.SERVER_HOST == null || env.SERVER_USER == null || env.SERVER_SSH_KEY == null}}
run: echo "Secrets not found. Skipping deployment."