Skip to content

Commit

Permalink
feat : added github actions to create a autmatic directory strucutre …
Browse files Browse the repository at this point in the history
…in readme
  • Loading branch information
arjunprakash027 committed Dec 8, 2024
1 parent 36e57b8 commit 0757b83
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/update-directory-structure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Update Directory Structure

on:
push:
branches:
- main # Adjust to your working branch

jobs:
generate-markdown:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Adjust Python version as needed

- name: Run the Python script
run: |
python readme_generator.py
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Built-in GitHub token
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
# Add and commit the changes
git add README.md
git commit -m "Updated directory structure at $(date -u +'%Y-%m-%d %H:%M:%S') [skip ci]" || echo "No changes to commit"
# Push the changes using the built-in GITHUB_TOKEN
git push

0 comments on commit 0757b83

Please sign in to comment.