feat(icon): 页签logo #16
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 # 大标题 | |
on: | |
push: | |
branches: | |
- master # 监听哪个分支的哪个动作 | |
permissions: | |
contents: write # 设置权限,可写,也可以不用配置,v4版本新增的 | |
jobs: | |
build-and-deploy: # 其中一个任务的名称,ID | |
runs-on: ubuntu-latest # 这个任务运行所需的环境 | |
steps: | |
- name: Check out Git repository # 第一步:获取源码 | |
uses: actions/checkout@v4 | |
- name: Setup Node.js # 第二步:安装Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install and Build # 第三步:下载依赖和构建 | |
run: | | |
npm install -g yarn | |
yarn install | |
npm run build | |
- name: Deploy # 第四步:部署 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: dist # 部署的目录 | |
branch: deploy # 部署到哪个分支 | |