Skip to content

Commit c5c22c6

Browse files
authored
Merge pull request #111 from MaxFork/max-updates-improve
Max Updates: adding some new fields (Last commit, Last public commit, Top languages, Total Stars), design and add favicon, Rename python scripts, Remove data injector and load data in runtime by ajax from json, Auto minifier for output html file, etc #110
2 parents bf4e7bc + ccfd7f8 commit c5c22c6

27 files changed

+998
-1452
lines changed

.github/workflows/fetch-daily.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Fetch GitHub Users Daily
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
fetch-users:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout main branch
15+
uses: actions/checkout@v6
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v6
19+
with:
20+
python-version: '3.14'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -e .
26+
27+
- name: Run fetch.py
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: python fetch.py
31+
32+
- name: Run render.py
33+
run: python render.py
34+
35+
- name: Check for changes
36+
id: changes
37+
run: |
38+
if git diff --quiet docs/; then
39+
echo "has_changes=false" >> $GITHUB_OUTPUT
40+
else
41+
echo "has_changes=true" >> $GITHUB_OUTPUT
42+
fi
43+
44+
- name: Commit and push changes
45+
if: steps.changes.outputs.has_changes == 'true'
46+
run: |
47+
git config user.name "github-actions[bot]"
48+
git config user.email "github-actions[bot]@users.noreply.github.com"
49+
git add docs/
50+
git commit -m "chore: daily update of GitHub faces data"
51+
git push origin main
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
name: Update GitHub Faces Daily
1+
name: Render HTML on Changes
22

33
on:
4-
schedule:
5-
- cron: '0 2 * * *'
6-
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- '**.py'
9+
- 'layouts/**'
10+
- 'docs/styles.css'
11+
- 'docs/script.js'
712
pull_request:
813
types: [closed]
14+
workflow_dispatch:
915

1016
jobs:
11-
update-faces:
17+
render-html:
1218
if: github.event_name != 'pull_request' || github.event.pull_request.merged == true
1319
runs-on: ubuntu-latest
1420
permissions:
@@ -27,18 +33,13 @@ jobs:
2733
python -m pip install --upgrade pip
2834
pip install -e .
2935
30-
- name: Run fetch_users.py
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
run: python fetch_users.py
34-
35-
- name: Run github_faces.py
36-
run: python github_faces.py
36+
- name: Run render.py
37+
run: python render.py
3738

3839
- name: Check for changes
3940
id: changes
4041
run: |
41-
if git diff --quiet docs/; then
42+
if git diff --quiet docs/index.html; then
4243
echo "has_changes=false" >> $GITHUB_OUTPUT
4344
else
4445
echo "has_changes=true" >> $GITHUB_OUTPUT
@@ -49,10 +50,10 @@ jobs:
4950
run: |
5051
git config user.name "github-actions[bot]"
5152
git config user.email "github-actions[bot]@users.noreply.github.com"
52-
git add docs/
53+
git add docs/index.html
5354
if [ "${{ github.event_name }}" == "pull_request" ]; then
54-
git commit -m "chore: update GitHub faces from merged PR"
55+
git commit -m "chore: render HTML from merged PR"
5556
else
56-
git commit -m "chore: daily update of GitHub faces data"
57+
git commit -m "chore: render HTML after code changes"
5758
fi
5859
git push origin main

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
.idea
22

33
# Cache and temp files
4-
temp/
5-
cache/
6-
*.cache
7-
*.json
4+
docs/index.html
85

96
# Python
107
__pycache__/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ You can modify these directly in `github_faces.py`.
6464

6565
## Screenshots
6666

67-
![Sample Faces](docs/images/other/preview.jpg)
67+
![Sample Faces](docs/images/other/screenshot-1280.png)
6868

6969
---
7070

51.8 KB
Loading
265 KB
Loading
46.5 KB
Loading
930 Bytes
Loading
2.8 KB
Loading

docs/images/other/favicon.ico

15 KB
Binary file not shown.

0 commit comments

Comments
 (0)