Skip to content

Plugin Documentation Generator #12

Plugin Documentation Generator

Plugin Documentation Generator #12

# Workflow to run plugin documentation generation then create a PR with the updated changes
name: Plugin Documentation Generator
permissions:
contents: write
pull-requests: write
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
generate_docs:
runs-on: [ self-hosted ]
# To disable this workflow, set DISABLE_AUTO_DOCS to 'true' in repository variables
if: vars.DISABLE_AUTO_DOCS != 'true'
env:
HOME: /tmp/github-actions-home
steps:
- name: Setup HOME directory
run: |
mkdir -p /tmp/github-actions-home
export HOME=/tmp/github-actions-home
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: ./dev-setup.sh
- name: Run plugin documentation generator
run: |
source venv/bin/activate
python docs/generate_plugin_doc_bundle.py \
--package nodescraper.plugins.inband \
--output docs/PLUGIN_DOC.md
- name: Format documentation with pre-commit
run: |
source venv/bin/activate
pre-commit run --files docs/PLUGIN_DOC.md || true
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "docs: Update plugin documentation [automated]"
committer: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
branch: automated-plugin-docs-update
delete-branch: true
title: "docs: Update plugin documentation [automated]"
body: |
Automated plugin documentation update generated by workflow.
This PR was automatically created by the Plugin Documentation Generator workflow.
labels: documentation,automated