Skip to content

Commit

Permalink
chore: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
1587315093 committed Oct 26, 2023
1 parent d9a3055 commit 3fc462e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
name: Check

on: [push, pull_request]

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Check
uses: actions/checkout@v3
with:
# 如果配置 themeConfig.lastUpdated 为 false,则不需要添加该参数以加快检出速度
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 16

- name: Install pnpm
id: pnpm-install
Expand All @@ -28,6 +29,3 @@ jobs:
- name: Lint
run: pnpm lint


# - name: Build
# run: pnpm build
29 changes: 28 additions & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,39 @@ on:
- master

jobs:

check:
runs-on: ubuntu-latest
steps:
- name: Check
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install pnpm
id: pnpm-install
uses: pnpm/[email protected]
with:
version: 7.5.0
run_install: false

- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm lint

deploy:
runs-on: ubuntu-latest
steps:
- name: Build with docs
run: pnpm docs:build
- name: Deploy wth github
- name: Deploy to github-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 3fc462e

Please sign in to comment.