Merge pull request #3 from lailixiaoheihong1/master #18
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: deploy | |
on: | |
push: | |
branches: [master] # 1.这里是你当前主分支的名字,我这里是main,你的可能是master | |
paths-ignore: | |
- README.md ## 2.表示该文件更新不会触发Github Actions部署,自行配置即可 | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- run: npm install # 安装依赖 | |
- run: npm run docs:build # 打包 | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_dir: ./docs-dist # 3.打包后文件的输出目录(根据你自己的项目情况而定) | |
github_token: ${{ secrets.GITHUB_TOKEN }} # 4.刚才你C下来的仓库token秘钥!!! | |
commit_message: 自动部署 # 5.部署时的 git 提交信息,自由填写 |