完善颜色选择器 #108
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
# 该workflow的名称,可以随意填写 | |
name: Build And Deploy To Github Pages | |
# workflow的触发事件,这里代表main分支的push事件触发 | |
on: | |
push: | |
branches: [master] | |
# 任务 | |
jobs: | |
# build-and-deploy 为任务的ID | |
build-and-deploy: | |
# 运行所需要的环境 | |
runs-on: ubuntu-latest | |
steps: | |
# 步骤名 | |
- name: Checkout | |
# 使用的actions脚本,这里是官方提供的获取源码脚本 | |
uses: actions/checkout@v4 | |
# 这个为使用 JamesIves/github-pages-deploy-action脚本所需要的配置 | |
with: | |
persist-credentials: false | |
# 执行npm脚本打包项目 | |
- name: Install and Build | |
run: | | |
npm install pnpm -g | |
pnpm install | |
npm run pack | |
npm run deploy | |
# 执行JamesIves/github-pages-deploy-action将项目发布到Github Pages | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@3.7.1 | |
with: | |
# 该workflow需要操作repo,因此需要一个密钥,下面会讲到如何获取这个密钥 | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
# 发布到的分支 | |
BRANCH: gh-pages | |
# 要发布的文件夹 | |
FOLDER: deploy |