-
-
Notifications
You must be signed in to change notification settings - Fork 16
43 lines (32 loc) · 1.01 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Update README on Push
on:
push:
branches:
- hyde-gallery
jobs:
update-readme:
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" # Use the latest Python version
- name: Pull the latest changes from remote main branch
run: |
git pull --no-rebase
- name: Run Python script to update README
run: |
python generate_readme.py
- name: Commit changes
run: |
# Configure git user info
git config --global user.name "github-actions"
git config --global user.email "[email protected]"
# Add and commit the changes to README.md
git add README.md
git commit -m "Update README with new data"
- name: Push changes to remote repository
run: |
git push https://github-actions[bot]:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}