Skip to content

feat: ēµę„Ÿ

feat: ēµę„Ÿ #33

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- master # ä½ åÆä»„ę ¹ę®éœ€č¦ę›“ę”¹åˆ†ę”Æ名ē§°
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18' # čÆ·ę ¹ę®ä½ ēš„锹ē›®éœ€ę±‚选ꋩ Node.js ē‰ˆęœ¬
- name: Install dependencies
run: npm install
- name: Build the project
run: npm run build
- name: Deploy to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
source: "./.vitepress/dist"
target: /var/www/html/z-doc
debug: true
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./vitepress/dist