Vercel maxDuration fix + GH Actions workflow for Vercel deployment
Changed default maxDuration to 10 so that users can easily fork and deploy to Vercel.
Also added a GH Actions workflow that changes maxDuration to 30 so that @anuraghazra can still have 30 for his deployment.
@anuraghazra after merging you have to change Vercel deployment branch from master to vercel.
@Zo-Bro-23 is attempting to deploy a commit to the github readme stats Team on Vercel.
A member of the Team first needs to authorize it.
@Zo-Bro-23 thanks for your pr! @anuraghazra this looks like a high quality PR.π It will stop people from trying to open maxDurarion PRs which I have to close.
Codecov Report
Base: 96.75% // Head: 96.90% // Increases project coverage by +0.15% :tada:
Coverage data is based on head (
d04b114) compared to base (4ff2c2a). Patch has no changes to coverable lines.
Additional details and impacted files
@@ Coverage Diff @@
## master #2424 +/- ##
==========================================
+ Coverage 96.75% 96.90% +0.15%
==========================================
Files 22 22
Lines 3883 3882 -1
Branches 329 337 +8
==========================================
+ Hits 3757 3762 +5
+ Misses 124 118 -6
Partials 2 2
| Impacted Files | Coverage Ξ | |
|---|---|---|
| src/fetchers/stats-fetcher.js | 93.14% <0.00%> (+2.13%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@Zo-Bro-23 we need to manually keep the vercel & master branch in sync right?
@Zo-Bro-23 we need to manually keep the
vercel&masterbranch in sync right?
Nope! That's what .github/workflows/deploy-prep.yml is for. It checks out the files from the master branch, edits vercel.json, and pushes to the vercel branch π
@Zo-Bro-23 we need to manually keep the
vercel&masterbranch in sync right?Nope! That's what
.github/workflows/deploy-prep.ymlis for. It checks out the files from themasterbranch, editsvercel.json, and pushes to thevercelbranch π
The logic looks okay to me. However, does it keeps the Public API URL the same? It seems like it would now be on the https://github-readme-stats-vercel.vercel.app endpoint. π€ Is there a way to deploy the changed code to Vercel while keeping the unchanged code in GitHub? Further, doesn't this action get run when people fork the repo? I did not have time to do tests yet, but I just wondered about some things.
@Zo-Bro-23 we need to manually keep the
vercel&masterbranch in sync right?Nope! That's what
.github/workflows/deploy-prep.ymlis for. It checks out the files from themasterbranch, editsvercel.json, and pushes to thevercelbranch tadaThe logic looks okay to me. However, does it keeps the Public API URL the same? It seems like it would now be on the
https://github-readme-stats-vercel.vercel.appendpoint. thinking Is there a way to deploy the changed code to Vercel while keeping the unchanged code in GitHub? Further, doesn't this action get run when people fork the repo? I did not have time to do tests yet, but I just wondered about some things.
The Vercel URL can be changed to anything as long as it is available. Right now since we're using https://github-readme-stats.vercel.app, it will remain that unless we change anything from the Dashboard. You need to go to Vercel, Settings, Git, and select vercel branch instead of master, but this won't change the URL or anything.
Is there a way to deploy the changed code to Vercel while keeping the unchanged code in GitHub?
This is my workaround for that. Feel free to comment if you have any better ideas. Since we can't really push code to Vercel without first pushing to GitHub, I'm basically just keeping a second vercel branch that is an exact copy of the master branch except for vercel.json.
As for the fork, I've added a commit (https://github.com/anuraghazra/github-readme-stats/pull/2424/commits/c766d0b2b3ea5c1d70027976b06ef7e8d36f20a6) that will disable this. Thanks for the idea! So if people fork and deploy, it will by default deploy from the master branch, which will have the correct vercel.json.
@Zo-Bro-23 we need to manually keep the
vercel&masterbranch in sync right?Nope! That's what
.github/workflows/deploy-prep.ymlis for. It checks out the files from themasterbranch, editsvercel.json, and pushes to thevercelbranch tadaThe logic looks okay to me. However, does it keeps the Public API URL the same? It seems like it would now be on the
https://github-readme-stats-vercel.vercel.appendpoint. thinking Is there a way to deploy the changed code to Vercel while keeping the unchanged code in GitHub? Further, doesn't this action get run when people fork the repo? I did not have time to do tests yet, but I just wondered about some things.The Vercel URL can be changed to anything as long as it is available. Right now since we're using
https://github-readme-stats.vercel.app, it will remain that unless we change anything from the Dashboard. You need to go to Vercel, Settings, Git, and selectvercelbranch instead ofmaster, but this won't change the URL or anything.Is there a way to deploy the changed code to Vercel while keeping the unchanged code in GitHub?
This is my workaround for that. Feel free to comment if you have any better ideas. Since we can't really push code to Vercel without first pushing to GitHub, I'm basically just keeping a second
vercelbranch that is an exact copy of themasterbranch except forvercel.json.As for the fork, I've added a commit (c766d0b) that will disable this. Thanks for the idea! So if people fork and deploy, it will by default deploy from the
masterbranch, which will have the correctvercel.json.
Cool, I overlooked that setting in the Vercel dashboard. πThen your PR looks good to me. Thanks a lot for implementing it. ππ»