first commit #1
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
# ci.yml | |
name: Vue Admin | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
concurrency: ci-${{ github.ref }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ # 将代码拉取到虚拟机 | |
uses: actions/checkout@v3 | |
- name: Install pnpm | |
run: npm i pnpm@7 -g | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'pnpm' | |
- name: Install and Build 🔧 # 安装依赖、打包,如果提前已打包好无需这一步 | |
run: | | |
pnpm install | |
pnpm build | |
- name: Deploy 🚀 # 部署 | |
uses: JamesIves/github-pages-deploy-action@v4.3.3 | |
with: | |
branch: gh-pages # 部署后提交到那个分支 | |
folder: dist # 这里填打包好的目录名称 |