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 local dev script #47

Open
franknoirot opened this issue Apr 28, 2023 · 8 comments
Open

Add local dev script #47

franknoirot opened this issue Apr 28, 2023 · 8 comments

Comments

@franknoirot
Copy link
Contributor

Inverse of how the website's local dev works, have a yarn script that pulls the latest website codebase and runs it locally, hot refreshing when edits are made to the content.

@franknoirot
Copy link
Contributor Author

I'm gonna have to take a different approach for this than the pull-cms-repos.mjs approach done from the website side.

I just tried to do that and remembered that repo doesn't build if you don't have a bunch of environment variables set locally. I would love to use the Vercel CLI to clone the environment variables locally as part of the script, but then we're talking about every teammate having a Vercel seat and that's not financially responsible.

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented May 2, 2023

Might it just make sense to use submodules in the website repo instead of pull-cms-repos.mjs ?

Submodules are a bit of a pain but the way I see it is that if you want to get live updates on content on the website as you build you can run yarn dev in the website, and once you're happy with your changes you can just push them to the docs repo from within the docs repo.

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented May 2, 2023

Trying to pull the the website repo into this temporarily sounds like a headache and hard than the other way around since the md files in the website repo are within a folder.

@franknoirot
Copy link
Contributor Author

I know it sounds like a headache, but I think it's worth me thinking about a bit. I want teammates to be able to write blog and other content—and preview it in the site—without needing to have all the environment variables and local setup for the entire website repo. You can't actually run the site locally without first having a Vercel seat currently, in order to copy down all the environment variables.

I think there is a path forward with NextJS's preview mode, so that you can like hit the live site with your local content somehow and SSR it in preview mode.

@Irev-Dev
Copy link
Collaborator

Irev-Dev commented May 4, 2023

That sounds good, I haven't had any epiphanies on how to do it though. Could code spaces be useful to us at all? as in would it be easier to setup a preview mode that pulled from the edited source if we were using code spaces?

@franknoirot
Copy link
Contributor Author

Yeah I think that's true, it's kinda like adding seats to Vercel cost-wise though, isn't it?

@Irev-Dev
Copy link
Collaborator

Yeah probably.

@KittyCAD KittyCAD deleted a comment from org-projects-app bot Sep 18, 2023
@lf94
Copy link
Contributor

lf94 commented Jan 7, 2024

I would much prefer to do it the way it's been setup: clone website, init submodules, do all work within the website directory. I can't imagine what's simpler than that... website repo should really be seen as the main point of entry for most things?

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

No branches or pull requests

3 participants