Skip to content

Commit

Permalink
Merge pull request #1 from coronasafe/setup-workflows
Browse files Browse the repository at this point in the history
Sync data and setup workflows
  • Loading branch information
rithviknishad authored Nov 21, 2023
2 parents d309845 + 13d29d4 commit 34fafd1
Show file tree
Hide file tree
Showing 374 changed files with 377,480 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

on:
push:
branches-ignore:
- main

permissions:
pull-requests: read

jobs:
Deploy-Preview:
runs-on: ubuntu-latest
environment: Open Healthcare Network
steps:
- name: Checkout Leaderboard
uses: actions/checkout@v4
with:
repository: coronasafe/leaderboard
path: .

- name: Checkout Leaderboard Data
uses: actions/checkout@v4
with:
path: ./data-repo
ref: ${{ github.ref }}
sparse-checkout: data

- name: Move Data to Leaderboard
run: mv ./data-repo/data ./data

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 6
run_install: false

- name: Install Vercel CLI
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
47 changes: 47 additions & 0 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Vercel Production Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches:
- main

jobs:
Deploy-Production:
runs-on: ubuntu-latest
environment: Open Healthcare Network
steps:
- name: Checkout Leaderboard
uses: actions/checkout@v4
with:
repository: coronasafe/leaderboard
path: .

- name: Checkout Leaderboard Data
uses: actions/checkout@v4
with:
path: ./data-repo
sparse-checkout: data

- name: Move Data to Leaderboard
run: mv ./data-repo/data ./data

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 6
run_install: false

- name: Install Vercel CLI
run: pnpm add --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
58 changes: 58 additions & 0 deletions .github/workflows/scraper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Main

on:
schedule:
- cron: "0 1 * * *" # 6:30am IST
workflow_dispatch:

permissions:
issues: read
pull-requests: read

jobs:
fetch-data:
name: Scrap data from GitHub and Slack
if: github.ref == 'refs/heads/main'
environment:
name: Open Healthcare Network
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: setup python
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: pip install -r scraper/requirements.txt

- name: Scrap GitHub data
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: python scraper/src/github.py ${{ github.repository_owner }} data/github -l DEBUG
on_retry_command: git checkout .
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Scrap EOD updates from Slack
if: ${{ env.SLACK_API_TOKEN }}
run: python scraper/src/slack.py --lookback_days=2
env:
SLACK_API_TOKEN: ${{ secrets.SLACK_API_TOKEN }}
SLACK_CHANNEL: ${{ vars.SLACK_EOD_CHANNEL }}

- name: Generate markdown files for new contributors
run: node scripts/generateNewContributors.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit changes
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "🌍 Update JSON - $(date -d '+5 hours +30 minutes' +'%d %b %Y | %I:%M %p')"
git push
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vercel
14 changes: 14 additions & 0 deletions contributors/AbhishekPSingh07.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: AbhishekPSingh07
title: Contributor
github: AbhishekPSingh07
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/AdityyaX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Aditya Pachauri
title: Contributor
github: AdityyaX
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/AdrianaMoralesQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Adriana Morales
title: Contributor
github: AdrianaMoralesQ
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/AlexVCS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Alex Curtis-Slep
title: Contributor
github: AlexVCS
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/Amanshenoy008.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Aman shenoy
title: Contributor
github: Amanshenoy008
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/AnuMessi10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Anurag Yadav
title: Contributor
github: AnuMessi10
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
16 changes: 16 additions & 0 deletions contributors/Ashesh3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Ashesh Kumar
title: GDC Intern
github: Ashesh3
twitter: Ashesh3
linkedin: Ashesh3
slack: U02T4HFA07Q
joining_date: "09/05/2022"
core: false
intern: true
operations: false
courses_completed:
["Web Development 101", "Web Development 202", "Web Development 301"]
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/AshrafMd-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Ashraf Mohammed
title: Contributor
github: AshrafMd-1
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/Ayan-thecodeking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Ayan gupta
title: Contributor
github: Ayan-thecodeking
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/Basharat908.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Basharat Ahmad Mir
title: Contributor
github: Basharat908
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/Bhavik-ag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Bhavik Agarwal
title: Contributor - C4GT'23
github: Bhavik-ag
twitter: BhavikAgarwal13
linkedin: bhavikagarwal2001
slack: U05998LB73N
joining_date: ""
core: false
intern: false
operations: false
---

A passionate full stack web developer and dedicated open source contributor, driven by a desire to create projects that have a meaningful impact on people's lives.
14 changes: 14 additions & 0 deletions contributors/CouldBeFree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Sasha Zoria
title: Contributor
github: CouldBeFree
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/Deepanshu039.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Deepanshu Gautam
title: Contributor
github: Deepanshu039
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/Deepjyoti14.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Deepjyoti14
title: Contributor
github: Deepjyoti14
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
14 changes: 14 additions & 0 deletions contributors/Drish-xD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Drish
title: Contributor
github: Drish-xD
twitter: ""
linkedin: ""
slack: ""
joining_date: ""
core: false
intern: false
operations: false
---

Still waiting for this
Loading

0 comments on commit 34fafd1

Please sign in to comment.