Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
jiazengp committed Aug 9, 2023
1 parent a565690 commit 56ac432
Show file tree
Hide file tree
Showing 112 changed files with 2,161 additions and 6,464 deletions.
118 changes: 0 additions & 118 deletions .github/diff.js

This file was deleted.

21 changes: 15 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
name: CHECK

env:
NODE_OPTIONS: --max-old-space-size=6144

on:
push:
branches:
- dev
- next
- main
- en
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node_version: [16, 18]
node_version:
- 18

steps:
- name: Checkout
uses: actions/checkout@v3
with:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,30 @@ name: DEPLOYMENT
on:
push:
branches:
- master
- main
- next

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node_version:
- 18

steps:
- uses: actions/checkout@main
- name: Checkout
uses: actions/checkout@v3
with:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '16'

# cache node_modules
- name: Cache pnpm modules
uses: actions/cache@v2
- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
node-version: ${{ matrix.node_version }}
cache: pnpm

- name: Install dependencies
uses: pnpm/action-setup@v2
Expand Down
33 changes: 23 additions & 10 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,27 @@ on:
# trigger deployment manually
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
docs:
runs-on: ubuntu-latest

strategy:
matrix:
node_version:
- 18

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -29,22 +46,18 @@ jobs:
uses: actions/setup-node@v3
with:
# choose node.js version to use
node-version: '16'

# cache node_modules
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
node-version: '18'

- name: Install dependencies
uses: pnpm/action-setup@v2
with:
run_install: true

- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: pnpm
# run build script
- name: Build site
run: pnpm build
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,8 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: '16'

# cache node_modules
- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
node-version: '18'
cache: pnpm

- name: Install dependencies
uses: pnpm/action-setup@v2
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ on:
jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node_version:
- 18

steps:
- uses: actions/checkout@main
with:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '16'

# cache node_modules
- name: Cache pnpm modules
uses: actions/cache@v2
- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
node-version: ${{ matrix.node_version }}
cache: pnpm

- name: Install dependencies
uses: pnpm/action-setup@v2
Expand Down
Loading

0 comments on commit 56ac432

Please sign in to comment.