Skip to content
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

Add button and config to deploy to Vercel #11

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

The-Best-Codes
Copy link

This PR creates the necessary vercel.json config and template URL so that users can easily deploy opendocs to Vercel using the Vercel default deploy button.

This PR addresses Issue #10.


Ignore the 30 commits 😅
I tried a LOT of Vercel configurations before I got one that worked. It turns out that deploying a monorepo to Vercel isn't always easy. I wound up with 8 test deployments (and GitHub repos) on my Vercel account and two on GitLab.

In the files changed tab, you can see what you need.

  • I had to add the node version and non-strict peer dependencies to the .npmrc file (took a long time to find out that was an issue, since Vercel decided to error without any logs on it).
  • The README has a new button. Definitely feel free to change it to match that style, but do not change the link! All the URL parameters in it are very important, though the demo-* ones are less important.
  • I also had to install next as a dependency in the workspace root, since Vercel sees the nextjs framework pointer and throws an error if it's not in your dependencies.
  • Nothing in the turbo.json file really changed, it just got formatted, and it was more readable, so I left it that way.
  • And of course, I added the Vercel config. The framework can't be set in URL parameters, and the URL parameters that are needed can't be set in the vercel.json file, so we wound up with an annoyingly small but necessary Vercel file.

Existing deployment: https://opendocs-next.vercel.app

Copy link

vercel bot commented Dec 20, 2024

@The-Best-Codes is attempting to deploy a commit to the Dalton Menezes' projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant