Skip to content

feat: 更新脚本

feat: 更新脚本 #45

Workflow file for this run

name: README-CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
# 执行npm脚本打包项目
- name: Install
run: |
pnpm install --no-frozen-lockfile
- name: Build SharedUtils
run: |
cd ./packages/shared
pnpm install
pnpm run build:site
- name: Build DingFlow
run: |
cd ./packages/ding-flow
pnpm install
pnpm run build
- name: Deploy DingFlow 🚀
uses: cross-the-world/scp-pipeline@master
with:
host: ${{ secrets.DR_HOST }}
user: ${{ secrets.DR_USER }}
pass: ${{ secrets.DR_PASS }}
port: ${{ secrets.DR_PORT }}
connect_timeout: 10s
local: './packages/ding-flow/dist/*'
remote: /web-site/ding-flow
- name: Deploy SharedUtils 🚀
uses: cross-the-world/scp-pipeline@master
with:
host: ${{ secrets.DR_HOST }}
user: ${{ secrets.DR_USER }}
pass: ${{ secrets.DR_PASS }}
port: ${{ secrets.DR_PORT }}
connect_timeout: 10s
local: './packages/shared/docs/.vitepress/dist*'
remote: /web-site/shared-utils