依赖工具改为 pnpm;优化类型定义 #30
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: GitHub Actions Build and Deploy Demo | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: 16 | |
- name: Install and Build 🔧 | |
run: | | |
pnpm i | |
CI=false pnpm run build | |
- name: Deploy 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
branch: gh-pages | |
folder: build |