Merge pull request #22 from JunyaoHu/21-navigation-affix-width-bug #107
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
# 以下以一个构建vue项目的yml文件为例子 | |
name: CI | |
# 给予工作流写权限,因为需要向gh-pages分支提交代码 | |
permissions: | |
contents: write | |
on: | |
push: | |
branches: | |
- main # 这里只配置了main分支,所以只有推送main分支才会触发以下任务 | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18.x" | |
- run: node -v | |
- run: npm install | |
- run: npm run build | |
- name: Deploy # 部署 | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # 部署后提交到那个分支 | |
folder: dist # 这里填打包好的目录名称 |