demo1.yml 解释
1、运行 在
main分支上运行yarnyarn build2、将
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