mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-02-03 02:23:38 +08:00
45 lines
910 B
YAML
45 lines
910 B
YAML
# 构建Docker镜像
|
|
name: Code-CI
|
|
|
|
## 触发条件
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
- 'next'
|
|
- '!pages/**'
|
|
# 手动触发部署
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
Code-CI:
|
|
runs-on: ubuntu-latest
|
|
# if: github.repository == '142vip/408CSFamily'
|
|
permissions:
|
|
actions: read
|
|
pull-requests: read
|
|
|
|
steps:
|
|
- name: checkout code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
|
|
fetch-depth: 0
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16.20.2
|
|
|
|
- name: PNPM Install
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 7
|
|
run_install: true
|
|
|
|
- name: Code Fix
|
|
run: ./scripts/lint --fix
|
|
- name: Build Site
|
|
run: ./scripts/bundle build
|