Skip to content

Commit

Permalink
Create deploy.yml for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Josp3r authored May 6, 2024
1 parent b86690a commit 8056abf
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy VitePress to GitHub Pages

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '16'

- name: Install dependencies
run: pnpm install

- name: Build VitePress
run: pnpm run docs:build --prefix docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/.vitepress/dist # 确保指向正确的构建输出目录

0 comments on commit 8056abf

Please sign in to comment.