Skip to content

Commit

Permalink
feat: 官方文档支持CI 自动化部署 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmdapl authored Jul 22, 2024
1 parent d8c1652 commit 5a786d3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要

- uses: pnpm/action-setup@v3

- name: Setup Node
Expand All @@ -49,17 +50,17 @@ jobs:
# 将README.md同步,利于github pages分支展示
- name: Add Readme.md To Dist
run: |
cp -f README.md docs/.vuepress/dist
cp -f README.md dist
- name: Check GitHub Pages status
uses: crazy-max/ghaction-github-status@v3
uses: crazy-max/ghaction-github-status@v4
with:
pages_threshold: major_outage

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist
path: dist

# 部署工作
deploy:
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,20 @@
"homePage": "https://142vip.cn"
},
"scripts": {
"preinstall": "npx only-allow pnpm && chmod +x ./scripts/* && pnpm build",
"preinstall": "npx only-allow pnpm && chmod +x ./scripts/*",
"dev": "vitepress dev --port 8080 --host",
"build": "npx fairy-cli turbo --build",
"build": "npx fa turbo --build",
"build:fairy-cli": "npx turbo run build --filter=@142vip/fairy-cli --color --only",
"build:docs": "vitepress build",
"clean": "npx fairy-cli clean --ignore-tips --all",
"clean": "npx fa clean --ignore-tips --all",
"lint": "npx eslint . --fix",
"publish": "npx lerna publish --canary from-git",
"preview": "vitepress preview"
},
"dependencies": {
},
"devDependencies": {
"@142vip/fairy-cli": "workspace:*",
"@142vip/changelog": "workspace:*",
"@142vip/vitepress": "workspace:*",
"@antfu/eslint-config": "^2.20.0",
Expand Down
2 changes: 2 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5a786d3

Please sign in to comment.