app/.github/workflows/deploy-docs-liteyukicloud.yml
Snowykami 8677286bd4
Some checks failed
Docker Image Build / build (push) Failing after 40s
Deploy VitePress site to Liteyuki PaaS / build (push) Failing after 1m46s
Pre-commit checks / pre-commit (3.10) (push) Failing after 2m58s
Pre-commit checks / pre-commit (3.11) (push) Failing after 16s
Pre-commit checks / pre-commit (3.12) (push) Failing after 36s
Pre-commit checks / pre-commit (3.13) (push) Failing after 35s
📝 更新pages部署地址
2025-03-10 23:07:21 +08:00

67 lines
1.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Deploy VitePress site to Liteyuki PaaS
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
statuses: write
concurrency:
group: pages
cancel-in-progress: false
env:
MELI_SITE: "800a7c09-dd9c-4ba7-a43f-af9bc69808c4"
jobs:
# 构建工作
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # 如果未启用 lastUpdated则不需要
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Setup API markdown
run: |-
python -m pip install litedoc
litedoc liteyuki -o docs/zh/dev/api -l zh-Hans -cd class -fd func -md func -vd var -bu https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/
litedoc liteyuki -o docs/en/dev/api -l en -cd class -fd func -md func -vd var -bu https://github.com/LiteyukiStudio/LiteyukiBot/tree/main/liteyuki/
- name: 安装 pnpm
uses: pnpm/action-setup@v2
with:
run_install: true
version: 8
- name: 设置 Node.js
run: |-
cd docs
pnpm install
- name: 构建文档
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |-
cd docs
pnpm run docs:build
> .vitepress/dist/.nojekyll
- name: "发布"
run: |
npx -p "@getmeli/cli" meli upload docs/.vitepress/dist \
--url "https://pages.liteyuki.icu" \
--site "$MELI_SITE" \
--token "$MELI_TOKEN" \
--release "$GITHUB_SHA"
env:
MELI_TOKEN: ${{ secrets.MELI_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}