Skip to content

gtech-mulearn/leaderboard-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template repository for Leaderboard Data Repo

Visit Open Healthcare Network's Leaderboard Deployment deployed from coronasafe/leaderboard-data repository.

⚙️ Configuring Scraper

The scraper scripts fetches data every 24 hours. The scraper workflow needs to run at an interval of 24 hours.

To change what time the scraper workflow runs, update the schedule cron value of the action:

# .github/workflows/scraper.yml
on:
  schedule:
    - cron: 0 0 * * *

🔑 Actions Secrets and Variables

Secrets:

Name Description
SLACK_API_TOKEN Optional; Required for scraping EOD messages for slack
GIT_ACCESS_TOKEN Personal Access Token; Needs write permissions to the data repo.

Variables:

Name Description
LEADERBOARD_REPO Optional; Specify to use a fork of the leaderboard app repo.
SLACK_EOD_CHANNEL Optional; The channel ID to use for scanning for EOD messages.

🚀 Deploying Leaderboard

TLDR; just click deploy...

Deploy with Vercel

Note

After deployment, run the scraper workflow once to populate the data repo with some data.

Environment Variables

GITHUB_PAT Some pages like releases, projects, etc. are server side rendered on-demand or pre-rendered during build time by calling GitHub's APIs and these calls requires authentication. Create a Personal Access Token (docs) with the following scopes repo, read:org, read:project, read:user.

⚙️ Deploy Configurations

The above deploy button uses the following configurations.

Root Directory: leaderboard Build Command: pnpm build Install Command: ./pre-deploy.sh && pnpm install

🎨 Personalizing Leaderboard Deployment

Leaderboard can be personalized by editing the contents in config directory.

Theme and Colors Leaderboard has support for light and dark mode. To edit the theme colors, update the theme.css file.

Logo To change the favicon and logo, replace the files present in the config/assets directory with the desired ones.