Skip to main content

demo1.yml 解释

1、运行 在 main 分支上运行 yarn yarn build

2、将 build 文件夹的内容推送到当前仓库的 gh-pages 分支

name: Build and Deploy
on:
push:
branches:
- main
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.1

- name: Install and Build
run: |
yarn
yarn build

- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.1
with:
branch: gh-pages
folder: build
clean: true