Skip to content

Commit a76ddc0

Browse files
committed
feat: followers workflow and display + wakatime
1 parent 6e639f9 commit a76ddc0

File tree

8 files changed

+394
-109
lines changed

8 files changed

+394
-109
lines changed

.github/workflows/blog-posts.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: Blog Posts
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '30 0 * * *' # This runs at 6 AM IST
7-
6+
- cron: "30 0 * * *" # This will run the workflow every day at 12:30 AM UTC or 6:00 AM IST
87

98
jobs:
109
update-posts:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Get Followers
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "30 0 * * *" # This will run the workflow every day at 12:30 AM UTC or 6:00 AM IST
7+
8+
jobs:
9+
update-followers:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Update followers list
14+
run: |
15+
cd scripts && npm install && ACCESS_TOKEN=${{ secrets.ACCESS_TOKEN }} npm run get:followers
16+
- name: Commit changes
17+
run: |
18+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
19+
git config --local user.name "github-actions[bot]"
20+
git add -A
21+
git diff-index --quiet HEAD || git commit -m "Update followers list"
22+
- name: Pull changes
23+
run: git pull -r
24+
- name: Push changes
25+
uses: ad-m/github-push-action@d91a481090679876dfc4178fef17f286781251df
26+
with:
27+
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,9 @@ My name is Pulkit. I'm a senior undergraduate from 🇮🇳
3434
### :bar_chart: [Coding time in the last month](https://wakatime.com/@pulkitxm)
3535

3636
<!--START_SECTION:waka-->
37+
<picture>
38+
<source media="(prefers-color-scheme: dark)" srcset="https://wakatime.com/share/@pulkitxm/cb46d850-e95d-4ed6-82ea-f09e6a9ca05d.svg">
39+
<img align="right" width="100%" src="https://wakatime.com/share/@pulkitxm/cb46d850-e95d-4ed6-82ea-f09e6a9ca05d.svg">
40+
</picture>
3741

3842
<!--END_SECTION:waka-->

scripts/package-lock.json

Lines changed: 304 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
"main": "index.js",
66
"type": "module",
77
"scripts": {
8-
"get:posts": "node src/fetchLatestBlogPosts.js"
8+
"get:posts": "node src/fetchLatestBlogPosts.js",
9+
"get:followers": "node src/fetchFollowers.js"
910
},
1011
"keywords": [],
1112
"author": "",
1213
"license": "ISC",
1314
"dependencies": {
15+
"@octokit/rest": "^21.0.2",
1416
"axios": "^1.7.9",
1517
"dotenv": "^16.4.7",
1618
"zod": "^3.23.8"
1719
}
18-
}
20+
}

0 commit comments

Comments
 (0)