deploy-gh-pages #416
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-gh-pages | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: # 下列文件的变更不触发部署 | |
- README.md | |
- LICENSE | |
pull_request: | |
branches: | |
- main | |
types: [closed] | |
schedule: | |
- cron: '30 5,11 * * *' | |
jobs: | |
deploy-gh-pages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# repo-token: ${{ secrets.DEPLOY_TOKEN }} | |
# submodules: true | |
- name: npm install | |
run: npm install | |
- name: build page | |
env: | |
NODE_OPTIONS: --max_old_space_size=8192 | |
run: |- | |
npm run build | |
- name: deploy page | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
# 文档部署到的分支名称 | |
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }} | |
BRANCH: page | |
FOLDER: dist/ | |
CLEAN: true |