You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add github action as recommended usage method (anuraghazra#4716)
* docs: add github action as recommended usage method
Add new github action as recommended usage method now that we are no
longer sponsored by vercel and the hosted endpoint is not available
anymore.
Co-authored-by: Ulysses Zhan <UlyssesZhan@gmail.com>
Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
* docs: improve action section
---------
Co-authored-by: Ulysses Zhan <UlyssesZhan@gmail.com>
Co-authored-by: Zohan Subhash <zohan.subhash@gmail.com>
Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
-[Keep your fork up to date](#keep-your-fork-up-to-date)
96
96
-[:sparkling\_heart: Support the project](#sparkling_heart-support-the-project)
97
97
</details>
98
98
99
99
# Important Notices <!-- omit in toc -->
100
100
101
101
> [!IMPORTANT]
102
-
> Since the GitHub API only [allows 5k requests per hour per user account](https://docs.github.com/en/graphql/overview/resource-limitations), the public Vercel instance hosted on `https://github-readme-stats.vercel.app/api`could possibly hit the rate limiter (see [#1471](https://github.com/anuraghazra/github-readme-stats/issues/1471)). We use caching to prevent this from happening (see https://github.com/anuraghazra/github-readme-stats#common-options). You can turn off these rate limit protections by [deploying your own Vercel instance](#deploy-on-your-own).
102
+
> The public Vercel instance at `https://github-readme-stats.vercel.app/api`is best-effort and can be unreliable due to rate limits and traffic spikes (see [#1471](https://github.com/anuraghazra/github-readme-stats/issues/1471)). We use caching to improve stability (see [common options](#common-options)), but for reliable cards we recommend [self-hosting](#deploy-on-your-own) (Vercel or other) or using the [GitHub Actions workflow](#github-actions-recommended) to generate cards in your[profile repository](https://docs.github.com/en/account-and-profile/how-tos/profile-customization/managing-your-profile-readme).
@@ -796,15 +796,66 @@ By default, GitHub does not lay out the cards side by side. To do that, you can
796
796
797
797
</details>
798
798
799
-
# Deploy on your own
799
+
# Deploy on your own (recommended)
800
800
801
-
## First step: get your Personal Access Token (PAT)
801
+
Because the public endpoint is [not reliable](#Important-Notices), we recommend self-deployment via GitHub Actions or your own hosted instance. GitHub Actions is the simplest setup with static SVGs stored in your repo but less frequent updates, while self-hosting takes more work and can serve fresher stats (with caching).
802
+
803
+
## GitHub Actions
804
+
805
+
GitHub Actions generates static SVGs and avoids per-request API calls. By default it uses `GITHUB_TOKEN` (public stats only), for private stats, set a [PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) as a secret and pass it to the action instead.
806
+
807
+
Create `/.github/workflows/grs.yml` in your profile repo (`USERNAME/USERNAME`):
See more options and examples in the [GitHub Readme Stats Action README](https://github.com/readme-tools/github-readme-stats-action#readme).
847
+
848
+
## Self-hosted (Vercel/Other)
849
+
850
+
Running your own instance avoids public rate limits and gives you full control over caching, tokens, and private stats.
851
+
852
+
### First step: get your Personal Access Token (PAT)
802
853
803
854
For deploying your own instance of GitHub Readme Stats, you will need to create a GitHub Personal Access Token (PAT). Below are the steps to create one and the scopes you need to select for both classic and fine-grained tokens.
804
855
805
856
Selecting the right scopes for your token is important in case you want to display private contributions on your cards.
806
857
807
-
### Classic token
858
+
####Classic token
808
859
809
860
* Go to [Account -> Settings -> Developer Settings -> Personal access tokens -> Tokens (classic)](https://github.com/settings/tokens).
810
861
* Click on `Generate new token -> Generate new token (classic)`.
@@ -813,7 +864,7 @@ Selecting the right scopes for your token is important in case you want to displ
813
864
* read:user
814
865
* Click on `Generate token` and copy it.
815
866
816
-
### Fine-grained token
867
+
####Fine-grained token
817
868
818
869
> [!WARNING]\
819
870
> This limits the scope to issues in your repositories and includes only public commits.
@@ -830,7 +881,7 @@ Selecting the right scopes for your token is important in case you want to displ
830
881
* Pull requests: read-only
831
882
* Click on `Generate token` and copy it.
832
883
833
-
## On Vercel
884
+
###On Vercel
834
885
835
886
### :film\_projector: [Check Out Step By Step Video Tutorial By @codeSTACKr](https://youtu.be/n6d4KHSKqGk?t=107)
836
887
@@ -866,7 +917,7 @@ Since the GitHub API only allows 5k requests per hour, my `https://github-readme
866
917
867
918
</details>
868
919
869
-
## On other platforms
920
+
###On other platforms
870
921
871
922
> [!WARNING]
872
923
> This way of using GRS is not officially supported and was added to cater to some particular use cases where Vercel could not be used (e.g. [#2341](https://github.com/anuraghazra/github-readme-stats/discussions/2341)). The support for this method, therefore, is limited.
@@ -883,7 +934,7 @@ Since the GitHub API only allows 5k requests per hour, my `https://github-readme
883
934
5. You're done 🎉
884
935
</details>
885
936
886
-
## Available environment variables
937
+
###Available environment variables
887
938
888
939
GitHub Readme Stats provides several environment variables that can be used to customize the behavior of your self-hosted instance. These include:
0 commit comments