Skip to content

更新规则文档

更新规则文档 #13

Workflow file for this run

name: Deploy Vue to Pages
on:
push:
branches:
- main # 或者是你的主分支名
paths:
- 'web/frontend/**' # 只有当这个目录下的文件变动时才触发
- '.github/workflows/deploy-web.yml'
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
working-directory: web/frontend
run: npm install
- name: Build
working-directory: web/frontend
env:
VITE_BASE_PATH: /
run: npm run build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: web/frontend/dist # Vue build 生成的静态文件目录
branch: gh-pages # 部署到的目标分支
cname: codingsnake.seveoi.icu