Skip to content

Update http-vs-websocket.md #83

Update http-vs-websocket.md

Update http-vs-websocket.md #83

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- v4
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22.6.0
- name: Install Dependencies
run: npm install
- name: Build Project
run: npx quartz build
- name: Set up ssh
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/key
chmod 600 ~/.ssh/key
ssh-keyscan -H ${{ secrets.REMOTE_HOST }} >> ~/.ssh/known_hosts
- name: Check Build Status
id: check_build
run: |
if [ -d public ]; then
echo "Build succeeded"
else
echo "Build failed"
exit 1
fi
- name: rsync Files to Remote Server
if: success()
run: rsync -avz -e "ssh -i ~/.ssh/key" --delete /home/runner/work/Notes/Notes ${{ secrets.USER }}@${{ secrets.REMOTE_HOST }}:${{ secrets.REMOTE_PATH }}