-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e01ae29
commit 7d66ee3
Showing
5 changed files
with
48 additions
and
159 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,45 @@ | ||
name: Run Python Script and Update README | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
run-script: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout main branch | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: 'main' | ||
fetch-depth: 0 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Configuring git credentials | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Atticuszz" | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install useful-scripts pre-commit | ||
- name: Run pre-commit hooks | ||
run: pre-commit run --all-files | ||
continue-on-error: true | ||
|
||
- name: Run the script for recently modified | ||
run: markdown --root ${{ github.workspace }} modify_recent --output ${{ github.workspace }}/README.md --num_commits 15 --dir src --title "### Latest Changes" | ||
|
||
|
||
- name: Commit README changes | ||
run: | | ||
git add README.md | ||
git add docs/ | ||
git commit -m "Update README.md automatically" || echo "No changes to commit" | ||
git push origin main |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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