Merge pull request #493 from mehul-m-prajapati/predefine_graphs #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update DFS-BFS-Graph-Travers Project Structure | |
on: | |
push: | |
branches: [ main, master ] | |
pull_request: | |
branches: [ main, master ] | |
# Optional: Manual trigger | |
workflow_dispatch: | |
jobs: | |
update-structure: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tree-format gitpython | |
- name: Generate Project Structure | |
run: | | |
python .github/scripts/generate_structure.py | |
- name: Commit and Push Changes | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add README.md | |
git diff --quiet && git diff --staged --quiet || git commit -m "docs: update project structure" | |
git push |