Skip to content

Merge pull request #362 from Kavya-24/hacktoberfest-2024-kavya #7

Merge pull request #362 from Kavya-24/hacktoberfest-2024-kavya

Merge pull request #362 from Kavya-24/hacktoberfest-2024-kavya #7

name: Generate Project Tree
on:
push:
branches:
- master
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
generate_tree:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Make script executable
run: chmod +x ./project_tree_directory_util.sh
- name: Delete existing project_tree_structure.txt if it exists
run: |
if [ -f project_tree_structure.txt ]; then
rm project_tree_structure.txt
fi
- name: Generate project tree structure
run: ./project_tree_directory_util.sh > project_tree_structure.txt
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add project_tree_structure.txt
git commit -m "Update project tree structure" || echo "No changes to commit"
git push