nonebot2/.github/workflows/release-plugin-docs.yml
2022-01-13 16:41:01 +08:00

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}}