Skip to content

deploy-gh-pages

deploy-gh-pages #413

Workflow file for this run

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