Skip to content

Commit 04cc5db

Browse files
committed
fix: changed docs.yml
1 parent 81f6fd0 commit 04cc5db

2 files changed

Lines changed: 27 additions & 21 deletions

File tree

.github/workflows/docs.yml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy docs
22

33
on:
44
push:
5-
branches: ['gh-pages']
5+
branches: [gh-pages]
66
workflow_dispatch:
77

88
permissions:
@@ -11,34 +11,42 @@ permissions:
1111
id-token: write
1212

1313
concurrency:
14-
group: 'pages'
14+
group: pages
1515
cancel-in-progress: false
1616

1717
jobs:
18-
deploy:
19-
environment:
20-
name: github-pages
21-
url: ${{ steps.deployment.outputs.page_url }}
18+
build:
2219
runs-on: ubuntu-latest
2320
steps:
2421
- name: Checkout
25-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- uses: pnpm/action-setup@v3
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
2628
with:
27-
ref: gh-pages
29+
node-version: 20
30+
cache: pnpm
2831
- name: Setup Pages
29-
uses: actions/configure-pages@v3
30-
- name: Install deps
31-
run: npm i
32-
- name: Built docs
33-
run: npm run docs:build
34-
- name: Move dist to "www/"
35-
run: mv .vitepress/dist/* .
32+
uses: actions/configure-pages@v4
33+
- name: Install dependencies
34+
run: pnpm i
35+
- name: Build with VitePress
36+
run: pnpm docs:build
3637
- name: Upload artifact
3738
uses: actions/upload-pages-artifact@v3
3839
with:
39-
path: '.'
40-
- name: Wait for 10s
41-
run: sleep 10
40+
path: docs/.vitepress/dist
41+
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
needs: build
47+
runs-on: ubuntu-latest
48+
name: Deploy
49+
steps:
4250
- name: Deploy to GitHub Pages
4351
id: deployment
4452
uses: actions/deploy-pages@v4

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# MrServer Website
22

33
Our official website source code, built with Vitepress.
4-
Hosted on Github Pages.
5-
6-
thanks to [google/zx](https://github.com/google/zx) for the Github Action.
4+
Hosted on Github Pages.
75

86
## License
97

0 commit comments

Comments
 (0)