Skip to content

[others] 更新依赖 #38

[others] 更新依赖

[others] 更新依赖 #38

name: Deploy to Github Pages
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
main:
name: Deploy to Github Pages
runs-on: ubuntu-latest
steps:
- name: 🧐 Checkout
id: checkout
uses: actions/checkout@v4
- name: 🔧 Setup pnpm
id: setup_pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: 🚧 Setup dependencies
id: setup_deps
run: |
pnpm install
- name: 📦 Build production pages
id: build
run: |
mv docs/.vitepress/config.mts docs/.vitepress/config.mts.bak
mv docs/.vitepress/config.pages.mts docs/.vitepress/config.mts
pnpm run build
cp docs/assets/logo.png dist/assets/
- name: 🚀 Deploy to Github Pages
id: deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
branch: gh-pages
token: ${{ secrets.DEPLOY_TOKEN }}