-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate @kadena/docs to use Vercel CLI to deploy to preview environments. #2249
Conversation
|
…apps associated with a PR in one go
28c0069
to
507216c
Compare
This PR is stale because it is open for 60 days with no activity |
@alber70g your call |
This PR is stale because it is open for 60 days with no activity |
Based on recent features in Vercel this PR shouldn't be needed anymore. It's unlikely that the added benefit outweighs the maintenance and complexity. |
Deploy to Vercel using Vercel CLI instead of Vercel/Github Integration
Related Issue/Asana ticket: https://app.asana.com/0/1206316065856327/1207502646350161/f
Short description:
This PR adds preview deployments for @kadena/docs by using the Vercel CLI instead of relying on the Vercel/GitHub integration. This allows us to build our apps on GitHub runners and then upload prebuilt sources for deployment. For Docs this reduces deployment time from around 6-7 minutes to around 40-60 seconds. This should greatly reduce the time developers need to spent waiting for their deployment to be ready, especially when all other apps are migrated too
The deployment workflow uses
turbo-ignore
to check for differences between the current branch and the base branch to determine if a deployment for an app is required. If a deployment is required, the Vercel CLI wil pull environment variables, build the app, create a tgz archive and upload to Vercel after which a deployment will be triggered.The deployment URL is then added to environments like so:
In short, this results in the following benefits:
Unfortunately, it's not all sunshine and rainbows there are also a few disadvantages. We lose branch-names for preview URLs. So instead of a branch name like
https://alpha-docs-git-feat-kadena-clipactjs-kadena-js.vercel.app/
, the generated preview url is more likehttps://alpha-docs-3dn06fmjg-kadena-js.vercel.app/
Tasks
<repository>-<pr_number>
Test scenarios
Reminders (if applicable)
pnpm install
andpnpm test
in the root of the monorepo(optionally with
--filter=...package...
to exclude non-affectedprojects)
pnpm changeset
in the root of the monorepodocs.kadena.io)