修改 yaml 配置文件 #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: auto gh-pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '14.21.3' | |
- name: Build Project example-vite2 | |
run: | | |
cd example-vite2 | |
npm install | |
npm run build | |
- name: Build Root Project | |
run: | | |
npm install | |
npm run build | |
npm run gh-pages | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: deploy gh-pages files | |
uses: JamesIves/github-pages-deploy-action@v4.5.0 | |
with: | |
folder: docs | |
branch: gh-pages |