mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
feat(docs): add indexer docs update script (#1872)
* feat(docs): add indexer docs update script Add Python script to automatically update indexer documentation from YAML definitions. - Creates a markdown table of supported indexers with feature support - Sorts indexers alphabetically with generics at the end - Includes support status for IRC and RSS features - Outputs documentation to autobrr.com/snippets/indexers.mdx * fix: use existing PAT * fix: use correct token * feat(docs): add freeleech support documentation
This commit is contained in:
parent
eb67f9459a
commit
85d2e51d0a
2 changed files with 172 additions and 0 deletions
64
.github/workflows/update-indexers.yml
vendored
Normal file
64
.github/workflows/update-indexers.yml
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
name: Update Indexers List
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
repository_dispatch:
|
||||
types: [update-indexers]
|
||||
|
||||
jobs:
|
||||
update-indexers:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out autobrr.com repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'autobrr/autobrr.com'
|
||||
path: 'autobrr.com'
|
||||
token: ${{ secrets.DOCS_TOKEN }}
|
||||
|
||||
- name: Check out autobrr repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'autobrr/autobrr'
|
||||
path: 'autobrr'
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Update indexers list
|
||||
run: python3 autobrr/scripts/update-indexers.py
|
||||
|
||||
- name: Create Pull Request
|
||||
run: |
|
||||
cd autobrr.com
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
|
||||
# Create a new branch
|
||||
BRANCH_NAME="update-indexers-$(date +%Y%m%d-%H%M%S)"
|
||||
git checkout -b $BRANCH_NAME
|
||||
|
||||
# Add and commit changes
|
||||
git add snippets/indexers.mdx snippets/freeleech.mdx
|
||||
|
||||
# Only proceed if there are changes
|
||||
if ! git diff --quiet && ! git diff --staged --quiet; then
|
||||
git commit -m "docs: update indexers and freeleech support lists"
|
||||
git push origin $BRANCH_NAME
|
||||
|
||||
# Create PR using GitHub CLI
|
||||
gh pr create \
|
||||
--repo autobrr/autobrr.com \
|
||||
--base main \
|
||||
--head $BRANCH_NAME \
|
||||
--title "docs: update indexers and freeleech support lists" \
|
||||
--body "Automated update of the indexers and freeleech support lists from definitions" \
|
||||
--label "documentation"
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.DOCS_TOKEN }}
|
Loading…
Add table
Add a link
Reference in a new issue