Created
January 20, 2022 14:16
-
-
Save fdch/23fd4077d9b8be0bf017ec420e13add5 to your computer and use it in GitHub Desktop.
Github Action to update and commit a file with a python script on every push.
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
name: Auto-update posts | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setting up python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9.7 | |
- name: Updating posts | |
run: | | |
python update_posts.py | |
- run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "Auto-Update posts" | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment