@@ -22,32 +22,37 @@ This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-opti
2222
2323## Generate Data for Libraries page
2424
25- First, create a GitHub Application.
25+ If GitHub CLI is already authenticated, update the library star counts using
26+ your existing credentials:
2627
27- Generate a private key for the GitHub application.
28-
29- Install the application.
28+ ``` bash
29+ GITHUB_TOKEN= " $( gh auth token ) " npm run generate:library-data
30+ ```
3031
31- Generate a ` .env ` file based on the ` .env.example ` file:
32+ Alternatively, generate a ` .env ` file based on the ` .env.example ` file:
3233
3334``` bash
3435cp .env.example .env
3536```
3637
37- Then, you'll need to add the values with your private key, app id and installation id into the ` .env ` file:
38+ Then, add your personal GitHub access token to the ` .env ` file:
3839
3940``` bash
40- GITHUB_APP_ID=
41- GITHUB_APP_PRIVATE_KEY=
42- GITHUB_INSTALLATION_ID=
41+ GITHUB_TOKEN=
4342```
4443
45- Run the ` libraries.js ` script to generate the ` libraries.json ` file :
44+ Then run the generator :
4645
4746``` bash
48- node libraries.js
47+ npm run generate:library-data
4948```
5049
50+ Both commands update ` src/data/libraries-next.json ` .
51+
52+ Production deployments refresh the star counts automatically using the
53+ workflow's built-in GitHub token. The production workflow also runs every
54+ Monday at 06:00 UTC.
55+
5156## Learn More
5257
5358To learn more about Next.js, take a look at the following resources:
@@ -65,4 +70,4 @@ Check out our [Next.js deployment documentation](https://nextjs.org/docs/deploym
6570
6671## License
6772
68- This project is licensed under the Apache License 2.0 - see the [ LICENSE] ( LICENSE ) file for details
73+ This project is licensed under the Apache License 2.0 - see the [ LICENSE] ( LICENSE ) file for details
0 commit comments