Skip to content

Commit 5f76cf5

Browse files
committed
Refactor projects page, update project details, and add workflow+script to auto-update periodically.
1 parent c6a8af7 commit 5f76cf5

File tree

6 files changed

+582
-172
lines changed

6 files changed

+582
-172
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Update Github project details
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Runs at 00:00 UTC every Sunday
6+
workflow_dispatch: # Allow manual triggering
7+
8+
jobs:
9+
update-stats:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0 # Needed for git history
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.13'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install pyyaml requests
26+
27+
- name: Update project details
28+
run: python scripts/update-projects.py "data/projects.yml"
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Commit changes
33+
if: success()
34+
run: |
35+
git config --global user.name "GitHub Actions"
36+
git config --global user.email "[email protected]"
37+
git add data/projects.yml
38+
git diff --quiet && git diff --staged --quiet || git commit -m "Auto-update GitHub project details."
39+
git push

config.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ paginate = 50
55
pygmentsstyle = "solarized-dark"
66
pygmentscodefences = true
77
pygmentscodefencesguesssyntax = true
8-
googleAnalytics = "UA-75485182-2"
98

109
[params]
1110
subtitle = "Technology blog of India's largest stock broker"

0 commit comments

Comments
 (0)