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

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

The-Best-Codes
Copy link
Contributor

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.

.npmrc Outdated Show resolved Hide resolved
Copy link

vercel bot commented Jan 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
opendocs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 27, 2025 1:18am

fix: try to fix vercel output path issues

fix: change output path (will break)

fix: rm src from vercel build config

fix: fix vercel build errors locally

fix: update env and add pnpm install

test: rm duplicate vercel conf json file

test: rm pnpm installation and build defaults

test: change before commands

test: rm monorepo conf

fix: install and build with defaults

test: force redeploy

fix: update vercel.json with root dir (may break)

test: map to apps/web (not .next)

fix: include .next in route mapping

test: revert some vercel config

test: update routing

test: revert, change to _next

test: revert, add _next in routes only

test: rm _next

test: apps/web

fix: revert

test: *sigh*

chore: update README for Vercel deployment and remove unused vercel.json files

chore: update Vercel deployment link in README to specify Next.js framework

test: update Vercel deployment link in README and add vercel.json for Next.js framework

test: new vercel link, framework file

fix: update Vercel deployment link and add Next.js framework support in README and package files

chore: update Vercel deployment link in README and enhance deploy button styling

fix: change vercel button
@daltonmenezes daltonmenezes merged commit dbc5598 into daltonmenezes:main Jan 27, 2025
3 checks passed
@daltonmenezes
Copy link
Owner

Thanks @The-Best-Codes 💜

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.

2 participants