Skip to content

Commit

Permalink
ci: use yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
hailaz committed Nov 14, 2024
1 parent 3533a61 commit c02747e
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache: yarn

- name: Install dependencies
run: |
npm ci
yarn
- name: generate contributors
run: |
Expand Down
11 changes: 7 additions & 4 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
# 安装依赖
yarn

# 添加依赖(举例)
yarn add @docusaurus/theme-classic

# 运行
yarn run start

Expand All @@ -27,10 +30,10 @@ mkdir -p i18n/en/docusaurus-plugin-content-docs-quick/current
cp -r quick/** i18n/en/docusaurus-plugin-content-docs-quick/current

# 创建多语言元数据
npm run write-translations -- --locale en
yarn run write-translations --locale en

# 指定i18n语言运行
npm run start -- --locale en
yarn run start --locale en

```

Expand All @@ -39,7 +42,7 @@ npm run start -- --locale en

创建新版本
```bash
npm run docusaurus docs:version v2.7.x
yarn run docusaurus docs:version v2.7.x
```


Expand All @@ -49,5 +52,5 @@ npm run docusaurus docs:version v2.7.x

```shell
# 因为插入的位置不同,我们使用 swizzle DocItem/Paginator来修改
npm run swizzle @docusaurus/theme-classic DocItem/Paginator -- --wrap --typescript
yarn run swizzle @docusaurus/theme-classic DocItem/Paginator --wrap --typescript
```
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@docusaurus/plugin-content-docs": "^3.6.1",
"@docusaurus/plugin-ideal-image": "^3.6.1",
"@docusaurus/preset-classic": "^3.6.1",
"@docusaurus/theme-classic": "^3.6.1",
"@giscus/react": "^3.0.0",
"@mdx-js/react": "^3.0.0",
"@node-rs/jieba": "^1.9.2",
Expand Down
32 changes: 32 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,38 @@
tslib "^2.6.0"
utility-types "^3.10.0"

"@docusaurus/theme-classic@^3.6.1":
version "3.6.1"
resolved "https://mirrors.tencent.com/npm/@docusaurus/theme-classic/-/theme-classic-3.6.1.tgz#dff4c7732b590e231dfb764e1d9a8acb5cf28954"
integrity sha512-5lVUmIXk7zp+n9Ki2lYWrmhbd6mssOlKCnnDJvY4QDi3EgjRisIu5g4yKXoWTIbiqE7m7q/dS9cbeShEtfkKng==
dependencies:
"@docusaurus/core" "3.6.1"
"@docusaurus/logger" "3.6.1"
"@docusaurus/mdx-loader" "3.6.1"
"@docusaurus/module-type-aliases" "3.6.1"
"@docusaurus/plugin-content-blog" "3.6.1"
"@docusaurus/plugin-content-docs" "3.6.1"
"@docusaurus/plugin-content-pages" "3.6.1"
"@docusaurus/theme-common" "3.6.1"
"@docusaurus/theme-translations" "3.6.1"
"@docusaurus/types" "3.6.1"
"@docusaurus/utils" "3.6.1"
"@docusaurus/utils-common" "3.6.1"
"@docusaurus/utils-validation" "3.6.1"
"@mdx-js/react" "^3.0.0"
clsx "^2.0.0"
copy-text-to-clipboard "^3.2.0"
infima "0.2.0-alpha.45"
lodash "^4.17.21"
nprogress "^0.2.0"
postcss "^8.4.26"
prism-react-renderer "^2.3.0"
prismjs "^1.29.0"
react-router-dom "^5.3.4"
rtlcss "^4.1.0"
tslib "^2.6.0"
utility-types "^3.10.0"

"@docusaurus/[email protected]":
version "3.6.1"
resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-3.6.1.tgz#d160516db9482ab19f7921d8a75093885d04d3de"
Expand Down

0 comments on commit c02747e

Please sign in to comment.