2024-11-23 10:49:10 +08:00

41 lines
1.1 KiB
YAML

name: deploying-doc
run-name: Deploying doc — ${{ github.run_id }}
on:
schedule:
- cron: 30 04 * * 1,4
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🚚 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
name: 🔧Install pnpm
with:
version: 9
run_install: false
- name: 🔧Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: 🔧Install dependencies
run: pnpm install
- name: 🔴Build doc
run: pnpm run docs:build
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
with:
server: ${{ secrets.FTP_SERVER_NAME }}
username: ${{ secrets.FTP_SERVER_USERNAME }}
password: ${{ secrets.FTP_SERVER_PASSWORD }}
local-dir: ./src/.vuepress/dist/
server-dir: ./jingji/book/