-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat : added github actions to create a autmatic directory strucutre …
…in readme
- Loading branch information
1 parent
36e57b8
commit 0757b83
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
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 |