Merge pull request #499 from Mayank4352/dev #2
This file contains hidden or 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 Project Structure | |
| on: | |
| push: | |
| branches: | |
| - github-action-project-structure | |
| - dev | |
| jobs: | |
| generate-structure: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Generate project structure | |
| run: | | |
| tree -a -I 'node_modules|.git' > project_structure.txt | |
| - name: Commit and push changes | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| if [[ -n $(git status --porcelain) ]]; then | |
| git add project_structure.txt | |
| git commit -m "chore: update project structure" | |
| git push | |
| else | |
| echo "No changes to commit." | |
| fi |