mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 6 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
name: Build and Deploy AstrBot Docs
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest # 运行环境
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v7
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v6.0.9
|
|
with:
|
|
version: 10.28.2
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: "24.13.0"
|
|
cache: "pnpm"
|
|
cache-dependency-path: docs/pnpm-lock.yaml
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
working-directory: './docs'
|
|
- name: Build docs
|
|
run: pnpm run docs:build
|
|
working-directory: './docs'
|
|
- name: scp
|
|
uses: appleboy/scp-action@v1.0.0
|
|
with:
|
|
host: ${{ secrets.HOST_NEKO }}
|
|
username: ${{ secrets.USERNAME }}
|
|
password: ${{ secrets.PASSWORDNEKO }}
|
|
source: 'docs/.vitepress/dist/*'
|
|
target: '/tmp/'
|
|
- name: script
|
|
uses: appleboy/ssh-action@v1.2.5
|
|
with:
|
|
host: ${{ secrets.HOST_NEKO }}
|
|
username: ${{ secrets.USERNAME }}
|
|
password: ${{ secrets.PASSWORDNEKO }}
|
|
script: |
|
|
mkdir -p /root/docker_data/caddy/caddy_data/static_site/abv4/
|
|
rm -rf /root/docker_data/caddy/caddy_data/static_site/abv4/*
|
|
mv /tmp/docs/.vitepress/dist/* /root/docker_data/caddy/caddy_data/static_site/abv4/
|
|
rm -rf /tmp/docs/
|