Update index.html #4
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: Actions CI - GitHub Actions Build and Deploy | |
on: | |
push: | |
branches: [ main ] | |
permissions: | |
contents: write | |
# 执行的一项或多项任务 | |
jobs: | |
build-and-deploy: | |
# 运行在虚拟机环境ubuntu-latest | |
# https://docs.github.com/zh/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
runs-on: ubuntu-latest | |
steps: | |
- name: 获取源码 🛎️ | |
uses: actions/checkout@v3 | |
- name: Node环境版本 🗜️ | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: 安装 Pnpm 🧬 | |
uses: pnpm/action-setup@v2 | |
id: pnpm-install | |
with: | |
version: 7 | |
run_install: true | |
- name: 安装依赖 ⚙️ | |
run: pnpm install | |
- name: 打包 🏗️ | |
run: | | |
npm run build | |
touch dist/.nojekyll | |
- name: 部署 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: dist | |
folder: dist | |
clean: true |