Update build.yml

This commit is contained in:
狮子耗耗 2024-11-06 17:42:18 +08:00
parent eb0e01518b
commit 045f5fb8c6

View File

@ -8,36 +8,35 @@ on:
workflow_dispatch:
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: 🚚 Checkout
uses: actions/checkout@v4
test:
runs-on: ubuntu-latest
steps:
- name: 🚚 Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- 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 Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Install dependencies
run: pnpm install
- name: Build doc
run: pnpm run docs:dev
- name: Build doc
run: pnpm run docs:dev
- 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: ./dist
server-dir: ./test
- 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: ./dist
server-dir: ./test