diff --git a/.github/workflows/nonebot_plugin_docs.yml b/.github/workflows/nonebot_plugin_docs.yml new file mode 100644 index 00000000..757ef41a --- /dev/null +++ b/.github/workflows/nonebot_plugin_docs.yml @@ -0,0 +1,40 @@ +name: Release Nonebot Plugin Docs + +on: + release: + types: [ published ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: '12' + - run: npm ci + - name: Build Docs + env: + VUEPRESS_BASE: '/docs/' + run: npx vuepress build docs --dest packages/nonebot-plugin-docs/nonebot_plugin_docs/dist + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + architecture: "x64" + - name: Install Poetry + run: | + python -m pip install --upgrade pip + pip install poetry + + - 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}}