法欧莉二号机二维码 #90
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 Index Page | |
on: | |
push: | |
branches: | |
- 'doc-index' | |
# Specify to run a workflow manually from the Actions tab on GitHub | |
workflow_dispatch: | |
concurrency: | |
group: "index-page-concurrency-group" | |
cancel-in-progress: true | |
jobs: | |
deploy-doc: | |
name: deploy-index-page | |
runs-on: ubuntu-latest | |
steps: | |
# 检出仓库代码 | |
- uses: actions/checkout@v4 | |
# setup nodejs | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16.x | |
cache: npm | |
# releases | |
# main-v4 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/main-v4' | |
path: 'public/kdoc/main-v4' | |
- run: | | |
cp -r kdoc/main-v4/* ./ | |
rm -rf kdoc/main-v4 | |
working-directory: ./public | |
# main | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/main' | |
path: 'public/kdoc/main' | |
- run: | | |
cp -r kdoc/main/* ./ | |
rm -rf kdoc/main | |
working-directory: ./public | |
# # mirai | |
# - uses: actions/checkout@v4 | |
# with: | |
# ref: 'kdoc-deploy/component-mirai' | |
# path: 'public/kdoc/cp-mirai' | |
# | |
# - run: | | |
# cp -r kdoc/cp-mirai/* ./ | |
# rm -rf kdoc/cp-mirai | |
# working-directory: ./public | |
# KOOK | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/component-kook' | |
path: 'public/kdoc/cp-kook' | |
- run: | | |
cp -r kdoc/cp-kook/* ./ | |
rm -rf kdoc/cp-kook | |
working-directory: ./public | |
# KOOK v3 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/component-kook-v3' | |
path: 'public/kdoc/cp-kook-v3' | |
- run: | | |
cp -r kdoc/cp-kook-v3/* ./ | |
rm -rf kdoc/cp-kook-v3 | |
working-directory: ./public | |
# QQ频道 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/component-qq-guild' | |
path: 'public/kdoc/cp-qg' | |
- run: | | |
mkdir -p kdoc/cp-qg | |
cp -r kdoc/cp-qg/* ./ | |
rm -rf kdoc/cp-qg | |
working-directory: ./public | |
# QQ频道 V3 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/component-qq-guild-v3' | |
path: 'public/kdoc/cp-qg-v3' | |
- run: | | |
mkdir -p kdoc/cp-qg-v3 | |
cp -r kdoc/cp-qg-v3/* ./ | |
rm -rf kdoc/cp-qg-v3 | |
working-directory: ./public | |
# Telegram | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/component-telegram' | |
path: 'public/kdoc/cp-tg' | |
- run: | | |
mkdir -p kdoc/cp-tg | |
cp -r kdoc/cp-tg/* ./ | |
rm -rf kdoc/cp-tg | |
working-directory: ./public | |
# OneBot | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/component-onebot' | |
path: 'public/kdoc/cp-ob' | |
- run: | | |
mkdir -p kdoc/cp-ob | |
cp -r kdoc/cp-ob/* ./ | |
rm -rf kdoc/cp-ob | |
working-directory: ./public | |
# snapshots | |
# main 快照 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/snapshots/main' | |
path: 'public/kdoc/snapshots/main' | |
- run: | | |
cp -r kdoc/snapshots/main/* ./ | |
rm -rf kdoc/snapshots/main | |
working-directory: ./public | |
# main v4 快照 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/snapshots/main-v4' | |
path: 'public/kdoc/snapshots/main-v4' | |
- run: | | |
cp -r kdoc/snapshots/main-v4/* ./ | |
rm -rf kdoc/snapshots/main-v4 | |
working-directory: ./public | |
# # mirai快照 | |
# - uses: actions/checkout@v4 | |
# with: | |
# ref: 'kdoc-deploy/snapshots/component-mirai' | |
# path: 'public/kdoc/snapshots/cp-mirai' | |
# | |
# - run: | | |
# cp -r kdoc/snapshots/cp-mirai/* ./ | |
# rm -rf kdoc/snapshots/cp-mirai | |
# working-directory: ./public | |
# KOOK快照 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/snapshots/component-kook' | |
path: 'public/kdoc/snapshots/cp-kook' | |
- run: | | |
cp -r kdoc/snapshots/cp-kook/* ./ | |
rm -rf kdoc/snapshots/cp-kook | |
working-directory: ./public | |
# KOOK快照 v3 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/snapshots/component-kook-v3' | |
path: 'public/kdoc/snapshots/cp-kook-v3' | |
- run: | | |
cp -r kdoc/snapshots/cp-kook-v3/* ./ | |
rm -rf kdoc/snapshots/cp-kook-v3 | |
working-directory: ./public | |
# QQ频道快照 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/snapshots/component-qq-guild' | |
path: 'public/kdoc/snapshots/cp-qg' | |
- run: | | |
cp -r kdoc/snapshots/cp-qg/* ./ | |
rm -rf kdoc/snapshots/cp-qg | |
working-directory: ./public | |
# QQ频道 V3 快照 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/snapshots/component-qq-guild-v3' | |
path: 'public/kdoc/snapshots/cp-qg-v3' | |
- run: | | |
cp -r kdoc/snapshots/cp-qg-v3/* ./ | |
rm -rf kdoc/snapshots/cp-qg-v3 | |
working-directory: ./public | |
# TG快照 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/snapshots/component-telegram' | |
path: 'public/kdoc/snapshots/cp-tg' | |
- run: | | |
cp -r kdoc/snapshots/cp-tg/* ./ | |
rm -rf kdoc/snapshots/cp-tg | |
working-directory: ./public | |
# OneBot快照 | |
- uses: actions/checkout@v4 | |
with: | |
ref: 'kdoc-deploy/snapshots/component-onebot' | |
path: 'public/kdoc/snapshots/cp-ob' | |
- run: | | |
cp -r kdoc/snapshots/cp-ob/* ./ | |
rm -rf kdoc/snapshots/cp-ob | |
working-directory: ./public | |
- run: | | |
npm ci | |
npm run build | |
# https://github.com/marketplace/actions/github-pages-action | |
- name: Push to doc repository | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.PUSH_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./dist | |
cname: docs.simbot.forte.love |