name: 部署
on:
workflow_dispatch: {}
push:
branches:
- main
schedule:
- cron: '0 */2 * * *'
repository_dispatch:
types: [feishu]
permissions:
contents: write
jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 构建
uses: docker://library/python:3.13
with:
entrypoint: /bin/sh
args: -c "python3 build.py && echo "成果"
- name: 设置 Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: 安装依赖
run: npm ci
- name: 构建文档
run: |-
npm run docs:build
> .vuepress/dist/.nojekyll
- name: 部署文档
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: .vuepress/dist