Skip to content

Commit b936bbe

Browse files
committed
added /home/alexbara var
1 parent 7b01c0d commit b936bbe

File tree

1 file changed

+31
-12
lines changed

1 file changed

+31
-12
lines changed
Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,62 @@
1-
# Workflow to run plugin documentation generation then commit the updated changes
1+
# Workflow to run plugin documentation generation then create a PR with the updated changes
22

33
name: Plugin Documentation Generator
44

55
permissions:
66
contents: write
7+
pull-requests: write
78

89
on:
910
workflow_dispatch:
11+
schedule:
12+
- cron: '0 0 * * *'
1013

1114
jobs:
1215
generate_docs:
1316
runs-on: [ self-hosted ]
1417
# To disable this workflow, set DISABLE_AUTO_DOCS to 'true' in repository variables
1518
if: vars.DISABLE_AUTO_DOCS != 'true'
19+
env:
20+
HOME: /tmp/github-actions-home
1621

1722
steps:
23+
- name: Setup HOME directory
24+
run: |
25+
mkdir -p /tmp/github-actions-home
26+
export HOME=/tmp/github-actions-home
27+
1828
- name: Checkout repository
1929
uses: actions/checkout@v4
2030
with:
2131
token: ${{ secrets.GITHUB_TOKEN }}
2232

23-
- name: Set up Python
24-
uses: actions/setup-python@v5
25-
with:
26-
python-version: '3.9'
27-
2833
- name: Install dependencies
2934
run: ./dev-setup.sh
3035

3136
- name: Run plugin documentation generator
3237
run: |
38+
source venv/bin/activate
3339
python docs/generate_plugin_doc_bundle.py \
3440
--package nodescraper.plugins.inband \
3541
--output docs/PLUGIN_DOC.md
3642
37-
- name: Commit and push changes
43+
- name: Format documentation with pre-commit
3844
run: |
39-
git config --global user.name "github-actions[bot]"
40-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
41-
git add docs/PLUGIN_DOC.md
42-
git diff --staged --quiet || git commit -m "docs: Update plugin documentation [automated]"
43-
git push
45+
source venv/bin/activate
46+
pre-commit run --files docs/PLUGIN_DOC.md || true
47+
48+
- name: Create Pull Request
49+
uses: peter-evans/create-pull-request@v6
50+
with:
51+
token: ${{ secrets.GITHUB_TOKEN }}
52+
commit-message: "docs: Update plugin documentation [automated]"
53+
committer: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
54+
author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
55+
branch: automated-plugin-docs-update
56+
delete-branch: true
57+
title: "docs: Update plugin documentation [automated]"
58+
body: |
59+
Automated plugin documentation update generated by workflow.
60+
61+
This PR was automatically created by the Plugin Documentation Generator workflow.
62+
labels: documentation,automated

0 commit comments

Comments
 (0)