This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
chore: scripts clean 指令缩写 (#332) #247
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fighting Design Github Actions | |
# 当 master 分支 push 代码的时候触发 workflow | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# 下载仓库代码 / 校验 | |
- name: Checkout | |
# actions/checkout@v3 是 github 官方的一个action,用于 clone 该仓库的源码到工作流中 | |
uses: actions/checkout@v3 | |
# 安装 pnpm | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
# 安装 node | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
cache: 'pnpm' | |
# 安装依赖项 | |
- name: Install | |
run: pnpm i --no-frozen-lockfile | |
# 打包组件 | |
- name: Build Docs | |
run: pnpm --filter @apps/admin build | |
- name: 📂 Sync files | |
uses: SamKirkland/[email protected] | |
with: | |
server: 114.115.157.254 | |
port: 21 | |
username: vben | |
password: ${{ secrets.ftp_password }} | |
local-dir: ./apps/admin/dist/ | |
dangerous-clean-slate: true |