Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 25 additions & 44 deletions .github/workflows/weekly_stats_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,42 @@
name: Stats file weekly update

on:
# Manual run enable
workflow_dispatch:

# Automatic run enable
schedule:
- cron: '00 1 * * 1' # At 01:00 on Mondays.




jobs:
# This workflow contains a single job
update_stats:
if: github.repository == 'ArmDeveloperEcosystem/arm-learning-paths'
runs-on: ubuntu-latest
steps:
- name: Check out current repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

# Use for debugging ssh sessions if needed
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3


# Test GitHub API if needed
#- name: Test GitHUB API
# run: |
# curl -L \
# -H "Accept: application/vnd.github+json" \
# -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\
# -H "X-GitHub-Api-Version: 2022-11-28" \
# https://api.github.com/repos/ArmDeveloperEcosystem/arm-learning-paths/issues


# Run python script to update files
- name: Run Python script to update files
run: |
cd tools/
pip install -r requirements.txt
python3 stats_data_generate.py --token ${{ secrets.GITHUB_TOKEN }} --repo https://api.github.com/repos/ArmDeveloperEcosystem/arm-learning-paths/

# GitHub credential setup
- name: setup git config
run: |
# setup the username and email.
git config user.name "GitHub Actions Stats Bot"
git config user.email "<>"

# Commit updated files in a new PR
- name: Commit updated stats files to repository
fetch-depth: 1

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: pip install pyyaml requests

- name: Run stats generation script
run: python3 tools/stats_data_generate.py --token ${{ secrets.GITHUB_TOKEN }}

- name: Fetch content_over_time.png from roadmap repo
run: |
git add data/stats_weekly_data.yml
# Push and commit only if changes to commit; if not, say so and end.
git commit -m 'automatic update of stats files' && git push origin main || echo "No changes to commit"
curl -sL -o content/stats/content_over_time.png \
"https://raw.githubusercontent.com/ArmDeveloperEcosystem/roadmap/main/reports/content-count/content_over_time.png"

- name: Setup git config
run: |
git config user.name "GitHub Actions Stats Bot"
git config user.email "<>"

- name: Commit updated stats files
run: |
git add data/stats_weekly_data.yml content/stats/content_over_time.png
git commit -m 'automatic update of stats files' && git push origin main || echo "No changes to commit"
36 changes: 10 additions & 26 deletions assets/css/stats.css
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@


#total-content-num {
width:fit-content;
width: fit-content;
font-size: 150px;
margin: 0;
padding: 0;
}
@media (min-width: 576px) {
#total-content-num { font-size: 200px; }
#total-content-num { font-size: 200px; }
}
@media (min-width: 768px) {
#total-content-num { font-size: 250px; }
}
@media (min-width: 992px) {
#total-content-num { font-size: 250px; }
#total-content-num { font-size: 250px; }
}
@media (min-width: 1200px) {
#total-content-num { font-size: 300px; }
#total-content-num { font-size: 300px; }
}

.total-content-context {
Expand All @@ -25,7 +20,7 @@
}

.unique-contributor-num {
width:fit-content;
width: fit-content;
font-size: 100px;
margin: 0;
padding: 0;
Expand All @@ -34,33 +29,21 @@
.stats-card:hover {
cursor: default;
}

ads-card.stats-card:hover * {
background: white;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}


.stats-table {
border: 1px solid var(--arm-black);
}

.stats-table td {
background-color: #010101;
}

.stats-table-row-highlight {
background-color: var(--arm-black)!important;
}



.test-status-pass {
color: var(--arm-green);
}
.test-status-fail {
color: #e86868; /* lighter arm red */
}

.stats-dividing-bar {
background-color: var(--arm-dark-grey);
height: 1px;
Expand All @@ -71,5 +54,6 @@ ads-card.stats-card:hover * {
color: var(--arm-light-grey);
}



.table-wrapper-for-overflow {
overflow-x: auto;
}
4 changes: 2 additions & 2 deletions content/stats/_index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
title: "Statistics"
layout: "stats_page" # Easier for dynamic content loading, keep the same
---
layout: "list"
---
Binary file added content/stats/content_over_time.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading