mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 09:05:04 +08:00
35 lines
904 B
YAML
35 lines
904 B
YAML
name: Release Nonebot Plugin Docs
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Python Environment
|
|
uses: ./.github/actions/setup-python
|
|
|
|
- name: Setup Node Environment
|
|
uses: ./.github/actions/setup-node
|
|
|
|
- name: Install and build
|
|
run: |
|
|
poetry run sphinx-build -M markdown ./docs_build ./build
|
|
cp -r ./build/markdown/* ./website/docs/api/
|
|
yarn prettier
|
|
yarn build:plugin --out-dir ../packages/nonebot-plugin-docs/nonebot_plugin_docs/dist
|
|
|
|
- name: Publish Package
|
|
run: |
|
|
export NONEBOT_VERSION=`poetry version -s`
|
|
cd packages/nonebot-plugin-docs/
|
|
poetry version $NONEBOT_VERSION
|
|
poetry build
|
|
poetry publish -u ${{secrets.PYPI_USERNAME}} -p ${{secrets.PYPI_PASSWORD}}
|