Skip to content

Commit

Permalink
Merge pull request #363 from Kavya-24/hacktoberfest-2024-kavya
Browse files Browse the repository at this point in the history
Use tree
  • Loading branch information
Kavya-24 authored Oct 2, 2024
2 parents dab1683 + fc2c114 commit e580c15
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1,147 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/generate_project_tree_structure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,34 @@ jobs:
fi
- name: Generate project tree structure
run: ./project_tree_directory_util.sh > project_tree_structure.txt
run: tree > project_tree_structure.txt


- name: Update README with project tree
run: |
# Define the identifier comment
IDENTIFIER="<!-- PROJECT_TREE_START -->"
END_IDENTIFIER="<!-- PROJECT_TREE_END -->"
# Remove old project tree section
sed -i.bak "/$IDENTIFIER/,/$END_IDENTIFIER/d" README.md
# Add new project tree section
echo "$IDENTIFIER" >> README.md
echo '<details close>' >> README.md
echo '<summary><h2 align="center">Project Tree Structure 📁</h2> </summary>' >> README.md
echo '```' >> README.md
cat project_tree_structure.txt >> README.md
echo '</details>' >> README.md
echo '</details>' >> README.md
echo "$END_IDENTIFIER" >> README.md
- 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 add README.md project_tree_structure.txt
git commit -m "Update project tree structure in README" || echo "No changes to commit"
git push
26 changes: 0 additions & 26 deletions project_tree_directory_util.sh

This file was deleted.

Loading

0 comments on commit e580c15

Please sign in to comment.