Skip to content

Add workflow_dispatch trigger to auto_review_documentation.yml for manual execution #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Auto Review Documentation Workflow

This workflow automatically reviews documentation changes and can be triggered in two ways:

## Triggers

### 1. Automatic Trigger
- **Push to main branch**: The workflow automatically runs when changes are pushed to the `main` branch

### 2. Manual Trigger (workflow_dispatch)
- **Manual execution**: You can manually trigger this workflow from the GitHub Actions UI
- **Any branch**: Can be run on any branch or commit, not just `main`
- **On-demand review**: Useful for reviewing documentation changes before merging

## How to Run Manually

1. Go to the **Actions** tab in your GitHub repository
2. Select **Auto Review Documentation** from the workflow list
3. Click **Run workflow**
4. Choose the branch you want to run the workflow on
5. Click **Run workflow** to start the manual execution

## Benefits of workflow_dispatch

- **Flexibility**: Run documentation reviews on feature branches before merging
- **Testing**: Test workflow changes without needing to push to main
- **On-demand reviews**: Review documentation at any time, not just on push events
- **Quality assurance**: Ensure documentation quality across all branches

## Workflow Configuration

```yaml
on:
push:
branches:
- main
workflow_dispatch:
```

The `workflow_dispatch` trigger enables manual runs from the Actions tab, allowing you to select any branch or commit for review.
39 changes: 39 additions & 0 deletions .github/workflows/auto_review_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Auto Review Documentation

on:
push:
branches:
- main
workflow_dispatch:

jobs:
review-documentation:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Review documentation
run: |
echo "Reviewing documentation changes..."
echo "Found markdown files:"
find . -name "*.md" -type f
echo ""
echo "Checking documentation structure..."
echo "Documentation files in docs/:"
ls -la docs/ || echo "No docs directory found"
echo ""
echo "Checking for broken links and basic formatting..."
# Add your documentation review logic here
# This could include linting, spell checking, or other validation