blogs/.github/workflows/deploy-docs.yml
SilverAg.L 4c90f70fc4
Some checks failed
部署文档 / build (push) Failing after 2s
2024 - 31.05.2025 All Bumped.
Thanks to the following contributors:
- @snowykami
- @frg2089
- Nya_Twisuki
2025-05-31 14:30:19 +08:00

72 lines
1.5 KiB
YAML

name: 部署文档
on:
push:
branches:
- main
paths:
- .github/**
- src/**
- docs/**
- public/**
- package.json
- vuepress.*.ts
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
statuses: write
env:
MELI_SITE: b9bc0b87-f062-4724-b2f5-55866ff12736
jobs:
build:
runs-on: [ubuntu-latest, public]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# lfs: true
# 如果你文档需要 Git 子模块,取消注释下一行
# submodules: true
- name: 设置 pnpm
uses: pnpm/action-setup@v4
# with:
# version: 8
- name: 设置 Node.js
uses: actions/setup-node@v4
with:
node-version: 23
cache: pnpm
- name: 安装依赖
run: |
corepack enable
pnpm install --frozen-lockfile
- name: 构建文档
env:
NODE_OPTIONS: --max_old_space_size=8192
run: |-
pnpm run docs:build
> dist/.nojekyll
- name: 推送 liteyuki pages
run: |
pnpx @getmeli/cli upload \
--branch main \
--url "https://dash.apage.dev" \
--site "$MELI_SITE" \
--token "$MELI_TOKEN" \
--release "$GITHUB_SHA" \
./dist
env:
MELI_TOKEN: ${{ secrets.MELI_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}