Skip to content

Commit 0af563e

Browse files
authored
add quick deploy config and workflow for libs data additions (#2183)
1 parent 4e93459 commit 0af563e

10 files changed

Lines changed: 236 additions & 16 deletions
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: '[CODE] Deploy production website (new data only)'
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- react-native-libraries.json
8+
9+
jobs:
10+
detect_changes:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
data_changed: ${{ steps.filter.outputs.data_changed }}
14+
other_changed: ${{ steps.filter.outputs.other_changed }}
15+
steps:
16+
- uses: actions/checkout@v6
17+
- id: filter
18+
name: Detect changed paths
19+
uses: dorny/paths-filter@v3
20+
with:
21+
filters: |
22+
data_changed:
23+
- 'react-native-libraries.json'
24+
other_changed:
25+
- '**'
26+
- '!react-native-libraries.json'
27+
28+
build:
29+
needs: detect_changes
30+
if: ${{ needs.detect_changes.outputs.data_changed == 'true' && needs.detect_changes.outputs.other_changed != 'true' }}
31+
runs-on: ubuntu-latest
32+
environment:
33+
name: production
34+
url: https://reactnative.directory
35+
steps:
36+
- uses: actions/checkout@v6
37+
- name: Use Bun
38+
uses: oven-sh/setup-bun@v2
39+
- name: Deploy
40+
shell: bash
41+
run: bunx vercel --force --token "$VERCEL_TOKEN" --prod --local-config /vercel-quick.json
42+
env:
43+
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
44+
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
45+
# https://spectrum.chat/zeit/now/solved-project-linking-and-ci-cd-pipelines~5e6eb62a-9d56-47ac-9e32-0d973a523787
46+
VERCEL_ORG_ID: 'team_IsLEAhLb9cZj6y1Bud9XYmeK'
47+
VERCEL_PROJECT_ID: 'QmecQ8hTu4DUHv6js5U8L9pJ9vp54mg1bmRLWaS5RZCyt4'

.github/workflows/vercel-cleanup-data-blobs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
push:
55
branches: [main]
66
schedule:
7-
# Run once a week on Thursday at midnight - https://crontab.guru/#0_0_*_*_2
8-
- cron: '0 0 * * 2'
7+
# Run three time a week on Tuesday, Thursday, and Saturday at midnight - https://crontab.guru/#0 0 * * 2,4,6
8+
- cron: '0 0 * * 2,4,6'
99

1010
jobs:
1111
build:

assets/check-data.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7688,5 +7688,11 @@
76887688
},
76897689
"@getlimelight/sdk": {
76907690
"newArchitecture": "untested"
7691+
},
7692+
"react-native-litert-lm": {
7693+
"newArchitecture": "new-arch-only"
7694+
},
7695+
"@thatkid02/react-native-pdf-viewer": {
7696+
"newArchitecture": "supported"
76917697
}
76927698
}

assets/data.json

Lines changed: 164 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -179300,13 +179300,164 @@
179300179300
],
179301179301
"popularity": 0.046,
179302179302
"topicSearchString": "node debugging devtools graphql network-inspector console-logs debugging-tool debugger node-debugger expo typescript"
179303+
},
179304+
{
179305+
"githubUrl": "https://github.com/hung-yueh/react-native-litert-lm",
179306+
"npmPkg": "react-native-litert-lm",
179307+
"android": true,
179308+
"ios": true,
179309+
"newArchitecture": "new-arch-only",
179310+
"github": {
179311+
"urls": {
179312+
"repo": "https://github.com/hung-yueh/react-native-litert-lm",
179313+
"homepage": "https://github.com/hung-yueh/react-native-litert-lm#readme"
179314+
},
179315+
"stats": {
179316+
"hasIssues": true,
179317+
"hasWiki": true,
179318+
"hasSponsorships": false,
179319+
"hasDiscussions": false,
179320+
"hasProjects": true,
179321+
"hasVulnerabilityAlerts": false,
179322+
"hasTopics": true,
179323+
"updatedAt": "2026-02-03T00:44:23Z",
179324+
"createdAt": "2026-01-21T19:08:42Z",
179325+
"pushedAt": "2026-02-03T00:44:23Z",
179326+
"forks": 0,
179327+
"issues": 0,
179328+
"subscribers": 0,
179329+
"stars": 0,
179330+
"dependencies": 1
179331+
},
179332+
"name": "react-native-litert-lm",
179333+
"fullName": "hung-yueh/react-native-litert-lm",
179334+
"isPrivate": false,
179335+
"description": "High-performance LLM inference for React Native using LiteRT-LM. Optimized for Gemma 3n and other on-device language models.",
179336+
"topics": [
179337+
"nitro",
179338+
"litert",
179339+
"litert-lm",
179340+
"llm",
179341+
"gemma",
179342+
"gemma-3n",
179343+
"ai",
179344+
"machine-learning",
179345+
"on-device",
179346+
"inference",
179347+
"expo"
179348+
],
179349+
"license": {
179350+
"key": "mit",
179351+
"name": "MIT License",
179352+
"spdxId": "MIT",
179353+
"url": "http://choosealicense.com/licenses/mit/",
179354+
"id": "MDc6TGljZW5zZTEz"
179355+
},
179356+
"hasTypes": true,
179357+
"newArchitecture": false,
179358+
"isArchived": false,
179359+
"hasReadme": true,
179360+
"hasNativeCode": true,
179361+
"configPlugin": false,
179362+
"moduleType": "nitro"
179363+
},
179364+
"npm": {
179365+
"downloads": 212,
179366+
"weekDownloads": 0,
179367+
"size": 426887,
179368+
"versionsCount": 3,
179369+
"latestRelease": "0.2.0",
179370+
"latestReleaseDate": "2026-02-03T00:44:21.714Z",
179371+
"hasReadme": true
179372+
},
179373+
"score": 25,
179374+
"matchingScoreModifiers": [
179375+
"Recently updated",
179376+
"Has a README file",
179377+
"Has a description"
179378+
],
179379+
"popularity": -1,
179380+
"topicSearchString": "nitro litert litert-lm llm gemma gemma-3n ai machine-learning on-device inference expo"
179381+
},
179382+
{
179383+
"githubUrl": "https://github.com/thatkid02/react-native-pdf-viewer",
179384+
"npmPkg": "@thatkid02/react-native-pdf-viewer",
179385+
"examples": [
179386+
"https://github.com/thatkid02/react-native-pdf-viewer/tree/main/example"
179387+
],
179388+
"ios": true,
179389+
"android": true,
179390+
"newArchitecture": true,
179391+
"github": {
179392+
"urls": {
179393+
"repo": "https://github.com/thatkid02/react-native-pdf-viewer",
179394+
"homepage": "https://github.com/thatkid02/react-native-pdf-viewer#readme"
179395+
},
179396+
"stats": {
179397+
"hasIssues": true,
179398+
"hasWiki": true,
179399+
"hasSponsorships": false,
179400+
"hasDiscussions": false,
179401+
"hasProjects": true,
179402+
"hasVulnerabilityAlerts": false,
179403+
"hasTopics": true,
179404+
"updatedAt": "2026-02-03T05:27:43Z",
179405+
"createdAt": "2026-02-01T15:04:52Z",
179406+
"pushedAt": "2026-02-03T05:27:43Z",
179407+
"forks": 0,
179408+
"issues": 0,
179409+
"subscribers": 0,
179410+
"stars": 0,
179411+
"dependencies": 0
179412+
},
179413+
"name": "@thatkid02/react-native-pdf-viewer",
179414+
"fullName": "thatkid02/react-native-pdf-viewer",
179415+
"isPrivate": false,
179416+
"registry": "https://registry.npmjs.org/",
179417+
"description": "Simple pdf viewer for ios(using PdfKit) and android(PdfRenderer) with thumbnails generation",
179418+
"topics": [
179419+
"ios",
179420+
"android"
179421+
],
179422+
"license": {
179423+
"key": "mit",
179424+
"name": "MIT License",
179425+
"spdxId": "MIT",
179426+
"url": "http://choosealicense.com/licenses/mit/",
179427+
"id": "MDc6TGljZW5zZTEz"
179428+
},
179429+
"hasTypes": true,
179430+
"newArchitecture": false,
179431+
"isArchived": false,
179432+
"hasReadme": true,
179433+
"hasNativeCode": true,
179434+
"configPlugin": false,
179435+
"moduleType": "nitro"
179436+
},
179437+
"npm": {
179438+
"downloads": 109,
179439+
"weekDownloads": 0,
179440+
"size": 325052,
179441+
"versionsCount": 2,
179442+
"latestRelease": "0.0.2",
179443+
"latestReleaseDate": "2026-02-03T05:19:17.389Z",
179444+
"hasReadme": true
179445+
},
179446+
"score": 25,
179447+
"matchingScoreModifiers": [
179448+
"Recently updated",
179449+
"Has a README file",
179450+
"Has a description"
179451+
],
179452+
"popularity": -1,
179453+
"topicSearchString": "ios android"
179303179454
}
179304179455
],
179305179456
"topics": {
179306-
"ios": 1114,
179307-
"android": 1087,
179457+
"ios": 1115,
179458+
"android": 1088,
179308179459
"component": 382,
179309-
"expo": 370,
179460+
"expo": 371,
179310179461
"typescript": 167,
179311179462
"javascript": 105,
179312179463
"web": 94,
@@ -179319,8 +179470,8 @@
179319179470
"library": 55,
179320179471
"picker": 54,
179321179472
"navigation": 47,
179473+
"nitro": 43,
179322179474
"modal": 42,
179323-
"nitro": 42,
179324179475
"svg": 37,
179325179476
"video": 36,
179326179477
"module": 35,
@@ -179365,9 +179516,9 @@
179365179516
"new-architecture": 18,
179366179517
"notification": 18,
179367179518
"popup": 18,
179519+
"ai": 17,
179368179520
"gesture-handler": 17,
179369179521
"loading": 17,
179370-
"ai": 16,
179371179522
"carousel": 16,
179372179523
"chart": 16,
179373179524
"css": 16,
@@ -179451,6 +179602,7 @@
179451179602
"font": 10,
179452179603
"fs": 10,
179453179604
"google": 10,
179605+
"llm": 10,
179454179606
"media": 10,
179455179607
"pinch": 10,
179456179608
"popover": 10,
@@ -179476,7 +179628,6 @@
179476179628
"html": 9,
179477179629
"images": 9,
179478179630
"immutable": 9,
179479-
"llm": 9,
179480179631
"music": 9,
179481179632
"node": 9,
179482179633
"opengl": 9,
@@ -180015,6 +180166,7 @@
180015180166
"local-network": 3,
180016180167
"localstorage": 3,
180017180168
"logger": 3,
180169+
"machine-learning": 3,
180018180170
"maestro": 3,
180019180171
"magnetometer": 3,
180020180172
"management": 3,
@@ -180426,6 +180578,7 @@
180426180578
"in-app-updates": 2,
180427180579
"in-view": 2,
180428180580
"inapp": 2,
180581+
"inference": 2,
180429180582
"info": 2,
180430180583
"initials": 2,
180431180584
"inner-shadow": 2,
@@ -180476,7 +180629,6 @@
180476180629
"lock-screen": 2,
180477180630
"lodash": 2,
180478180631
"lottie-splash-screen": 2,
180479-
"machine-learning": 2,
180480180632
"mail": 2,
180481180633
"mansonry": 2,
180482180634
"mapbox-gl": 2,
@@ -180543,6 +180695,7 @@
180543180695
"offlinefirst": 2,
180544180696
"oidc": 2,
180545180697
"old-architecture": 2,
180698+
"on-device": 2,
180546180699
"one-tap-signin": 2,
180547180700
"one-time-code": 2,
180548180701
"onesignal-notifications": 2,
@@ -182118,6 +182271,8 @@
182118182271
"gcdhttpserver": 1,
182119182272
"gdpr": 1,
182120182273
"gemini": 1,
182274+
"gemma": 1,
182275+
"gemma-3n": 1,
182121182276
"generate": 1,
182122182277
"generate-qr": 1,
182123182278
"generating-barcodes": 1,
@@ -182399,7 +182554,6 @@
182399182554
"indicators": 1,
182400182555
"indoor-maps": 1,
182401182556
"indoor-positioning": 1,
182402-
"inference": 1,
182403182557
"infinite-picker": 1,
182404182558
"infinite-scroll-picker": 1,
182405182559
"infinite-scroll-wheel-picker": 1,
@@ -182620,6 +182774,8 @@
182620182774
"list-box": 1,
182621182775
"listitem": 1,
182622182776
"lite": 1,
182777+
"litert": 1,
182778+
"litert-lm": 1,
182623182779
"live-data": 1,
182624182780
"live-markdown": 1,
182625182781
"livekit": 1,
@@ -182989,7 +183145,6 @@
182989183145
"okhttp": 1,
182990183146
"okta": 1,
182991183147
"on-demand": 1,
182992-
"on-device": 1,
182993183148
"on-device-inference": 1,
182994183149
"on-device-llm": 1,
182995183150
"on-device-ml": 1,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"scripts": {
55
"start": "next dev --webpack",
66
"build": "bun data:update && bun llms:generate && next build --webpack",
7+
"build:quick": "bun data:update-missing --missing-only && bun llms:generate && next build --webpack",
78
"preview": "next build --webpack && next start",
89
"lint": "oxlint --type-aware && oxfmt --check",
910
"lint:fix": "oxlint --type-aware --fix && oxfmt",

scripts/build-and-score-data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,11 @@ async function buildAndScoreData() {
211211
}
212212
return library;
213213
}),
214-
topics,
214+
topics: sortTopics(topicCounts),
215215
}
216216
: {
217217
libraries: newDataEntry ? [...libraries, newDataEntry] : libraries,
218-
topics,
218+
topics: sortTopics(topicCounts),
219219
};
220220

221221
fileContent = JSON.stringify(content, null, 2);

scripts/calculate-score.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ const MIN_GITHUB_STARS = 25;
3838
const DATE_NOW = Date.now();
3939
const WEEK_IN_MS = 6048e5;
4040

41-
console.log('Min score:', MIN_SCORE);
42-
console.log('Max score:', MAX_SCORE);
43-
4441
export function calculatePopularityScore(data: LibraryType) {
4542
if (!data?.npm || !data.npm?.downloads || !data.npm?.weekDownloads) {
4643
return {

scripts/recalculate-scores.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import fs from 'node:fs';
22
import path from 'node:path';
33

44
import { type DataAssetType } from '~/types';
5+
import { MAX_SCORE, MIN_SCORE } from '~/util/scoring';
56

67
import data from '../assets/data.json';
78

@@ -11,6 +12,9 @@ const LIBRARIES_JSON_PATH = path.join('assets', 'data.json');
1112

1213
console.log('🧮 Recalculating popularity and directory scores');
1314

15+
console.log('Min score:', MIN_SCORE);
16+
console.log('Max score:', MAX_SCORE);
17+
1418
const { libraries, ...rest } = data as DataAssetType;
1519
const processedLibraries = libraries
1620
.map(lib => calculatePopularityScore(lib))

0 commit comments

Comments
 (0)