Skip to content

Commit e9f914d

Browse files
committed
chore: Deploy Vitepress with npm
1 parent b0ad2dd commit e9f914d

File tree

3 files changed

+2288
-30
lines changed

3 files changed

+2288
-30
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,36 @@ concurrency:
2020
jobs:
2121
build:
2222
runs-on: ubuntu-latest
23-
defaults:
24-
run:
25-
working-directory: ./docs
2623
steps:
2724
- name: Checkout
2825
uses: actions/checkout@v4
2926
with:
3027
fetch-depth: 0
31-
# - name: Setup node
32-
# uses: actions/setup-node@v4
33-
# with:
34-
# node-version: 20
35-
# cache: npm
36-
# - name: Setup Pages
37-
# uses: actions/configure-pages@v4
38-
# - name: Install dependencies
39-
# run: npm ci
40-
# - name: Build with VitePress
41-
# run: pnpm --filter "docs" build
42-
# - name: Upload artifact
43-
# uses: actions/upload-pages-artifact@v3
44-
# with:
45-
# path: docs/.vitepress/dist
28+
- name: Setup node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: npm
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v4
35+
- name: Install dependencies
36+
working-directory: ./docs
37+
run: npm ci
38+
- name: Build with VitePress
39+
working-directory: ./docs
40+
run: npm run build
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: docs/.vitepress/dist
4645

47-
# deploy:
48-
# environment:
49-
# name: github-pages
50-
# url: ${{ steps.deployment.outputs.page_url }}
51-
# needs: build
52-
# runs-on: ubuntu-latest
53-
# steps:
54-
# - name: Deploy to GitHub Pages
55-
# id: deployment
56-
# uses: actions/deploy-pages@v4
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
needs: build
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)