Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- main # 将此处替换为你的默认分支名
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- name: Install and Build 🔧
run: |
npm install
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages # GitHub Pages 的分支
folder: dist # build 命令生成的文件夹