Skip to content

Commit 5a786d3

Browse files
authored
feat: 官方文档支持CI 自动化部署 (#11)
1 parent d8c1652 commit 5a786d3

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.github/workflows/deploy.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
uses: actions/checkout@v4
3131
with:
3232
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
33+
3334
- uses: pnpm/action-setup@v3
3435

3536
- name: Setup Node
@@ -49,17 +50,17 @@ jobs:
4950
# 将README.md同步,利于github pages分支展示
5051
- name: Add Readme.md To Dist
5152
run: |
52-
cp -f README.md docs/.vuepress/dist
53+
cp -f README.md dist
5354
5455
- name: Check GitHub Pages status
55-
uses: crazy-max/ghaction-github-status@v3
56+
uses: crazy-max/ghaction-github-status@v4
5657
with:
5758
pages_threshold: major_outage
5859

5960
- name: Upload artifact
6061
uses: actions/upload-pages-artifact@v3
6162
with:
62-
path: docs/.vitepress/dist
63+
path: dist
6364

6465
# 部署工作
6566
deploy:

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,20 @@
1414
"homePage": "https://142vip.cn"
1515
},
1616
"scripts": {
17-
"preinstall": "npx only-allow pnpm && chmod +x ./scripts/* && pnpm build",
17+
"preinstall": "npx only-allow pnpm && chmod +x ./scripts/*",
1818
"dev": "vitepress dev --port 8080 --host",
19-
"build": "npx fairy-cli turbo --build",
19+
"build": "npx fa turbo --build",
20+
"build:fairy-cli": "npx turbo run build --filter=@142vip/fairy-cli --color --only",
2021
"build:docs": "vitepress build",
21-
"clean": "npx fairy-cli clean --ignore-tips --all",
22+
"clean": "npx fa clean --ignore-tips --all",
2223
"lint": "npx eslint . --fix",
2324
"publish": "npx lerna publish --canary from-git",
2425
"preview": "vitepress preview"
2526
},
2627
"dependencies": {
2728
},
2829
"devDependencies": {
30+
"@142vip/fairy-cli": "workspace:*",
2931
"@142vip/changelog": "workspace:*",
3032
"@142vip/vitepress": "workspace:*",
3133
"@antfu/eslint-config": "^2.20.0",

pnpm-lock.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)