This commit is contained in:
HapeLee
2026-05-27 01:15:34 +08:00
parent 9e4139059c
commit 4a9d655d20
+23 -9
View File
@@ -19,26 +19,40 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json
- run: cd docs && npm ci
- run: cd docs && npx vitepress build
- uses: actions/upload-pages-artifact@v3
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: cd docs && npm ci
- name: Build with VitePress
run: cd docs && npx vitepress build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/.vitepress/dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- id: deployment
uses: actions/deploy-pages@v4
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4