chore: Simplify automation - minimal bot features and conservative workflows

This commit is contained in:
KaifAhmad1
2025-11-24 14:57:07 +05:30
parent d330556dbb
commit e2bf95da72
8 changed files with 242 additions and 150 deletions
+6 -34
View File
@@ -12,6 +12,8 @@ on:
paths:
- 'docs/**'
- 'mkdocs.yml'
workflow_dispatch:
# Manual trigger for deploying documentation
jobs:
build:
@@ -42,42 +44,12 @@ jobs:
fi
continue-on-error: true
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
# Documentation deployment is manual for safety
# To deploy: Go to Actions tab -> Documentation workflow -> Run workflow
- name: Deploy to GitHub Pages (Manual)
if: github.event_name == 'workflow_dispatch'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
keep_files: false
preview:
name: Preview Documentation
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-docs.txt
pip install mkdocs-material mkdocstrings[python]
- name: Build documentation
run: mkdocs build --strict
- name: Comment PR with preview link
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '📚 Documentation preview will be available after merge.'
})