Skip to content

Commit 81590b5

Browse files
committed
modified: .github/actions/recent-posts/main.py
- Trying to run `git` commands via `subprocess.run`. Will see if it works!
1 parent e351bfa commit 81590b5

File tree

1 file changed

+5
-0
lines changed
  • .github/actions/recent-posts

1 file changed

+5
-0
lines changed

.github/actions/recent-posts/main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from datetime import datetime
22
from os import environ
3+
import subprocess
34
from typing import Annotated, Final
45

56
import httpx
@@ -58,6 +59,10 @@ def main(
5859
with readme.open(mode="a") as f:
5960
f.write(f"result={json_string}\n")
6061

62+
subprocess.run(args=["git", "add", readme.as_posix()])
63+
subprocess.run(args=["git", "commit", "-m", "Synced and updated with most recent it176131.github.io blog post"])
64+
subprocess.run(args=["git", "push"])
65+
6166

6267
if __name__ == "__main__":
6368
app()

0 commit comments

Comments
 (0)