-
Notifications
You must be signed in to change notification settings - Fork 485
46 lines (37 loc) · 1.2 KB
/
update-readme.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
43
44
45
46
name: Update README
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: main # Replace with the desired branch name
- name: Install Node.js and Dependencies
uses: actions/setup-node@v2
with:
node-version: '14' # Use the Node.js version you need
- name: Install Dependencies
run: |
npm install axios fs
working-directory: ${{ github.workspace }}
- name: Debug
run: |
echo "Contents of the workspace:"
ls -la
cat README.md
working-directory: ${{ github.workspace }}
- name: Run External Script
run: node ./updateReadme.js
- name: Commit and Push Changes
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add .
git commit -m "Update README and dynamic content"
git push origin HEAD:main # Replace 'main' with your branch name if different
working-directory: ${{ github.workspace }}