forked from HarshCasper/Rotten-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecent_blogs.yml
More file actions
26 lines (24 loc) · 714 Bytes
/
recent_blogs.yml
File metadata and controls
26 lines (24 loc) · 714 Bytes
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
name: README Update By Latest Blogs
on:
schedule:
#scheduled for every 5 hour
- cron: "* */5 * * *"
jobs:
perform:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "14.x"
- run: npm install node-fetch
- name: Run script
run: node update_readme.js
- name: Commit and push if changed
run: |
git add README.md
git diff
git config --global user.email "hashnode-bot@example.com"
git config --global user.name "Hashnode Bot"
git commit -m "Update README with latest blog" -a || echo "No changes to commit"
git push