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

Clarify how the Pages git-integration can be added to a Next.js app #12707

Conversation

dario-piotrowicz
Copy link
Member

@dario-piotrowicz dario-piotrowicz commented Jan 27, 2024

This is an attempt on clarifying how the git-integration can be added to a Next.js app created in the guide (since the guide mostly relies on C3 which just manually deploys the app for users).

I testing the water with this PR, If this change is beneficial I can apply the same sort of change to all the other Pages guides which use C3 which, I believe make the whole manual vs git-integration deployment topic very unclear

Nuxt for example

For example see the Nuxt guide: https://developers.cloudflare.com/pages/framework-guides/deploy-a-nuxt-site/

It asks people to create a GitHub repo without knowing it they plan to use the git-integration, then it tells them how to deploy using C3 or how to deploy via the dashboard, all without never saying that the git integration can only happen if they haven't yet deployed via C3

It does feels quite confusing/unclear to me 😕

cc. @deadlypants1973


- install necessary dependencies, including the [Wrangler](/workers/wrangler/install-and-update/#check-your-wrangler-version) CLI and the `@cloudflare/next-on-pages` adapter
- ask you a series of setup questions
- allow you to setup a new git repo
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to mention the new git repo part here as it can confuse people and it also doesn't really add much to the guide

@@ -9,20 +9,21 @@ title: Deploy a Next.js site

This guide will instruct you how to deploy a full-stack Next.js project which uses the [Edge Runtime](https://nextjs.org/docs/app/api-reference/edge).

## Create a new project using the `create-cloudflare` CLI (C3)
## Create a new project using C3
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just find it nicer shortened (as the longer version was getting wrapped onto multiple lines), but I can revert this if we prefer the longer version 🙂


Besides manual deployments, you can make use of the [Pages git integration](/pages/configuration/git-integration), which allows you to connect a GitHub repository to your Pages application and have the application automatically built and deployed after each new commit is pushed to it.

This requires a basic understanding of [Git](https://git-scm.com/). If you are new to Git, refer to this [summarized Git handbook](https://guides.github.com/introduction/git-handbook/) on how to set up Git on your local machine.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately there's a bunch of stuff here that I copy-pasted from existing partials, the issue is that things are different enough for the partials not to be reusable here 😢

Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a great improvement! @deadlypants1973 can you please take a look as well?

content/pages/framework-guides/deploy-a-nextjs-site.md Outdated Show resolved Hide resolved
content/pages/framework-guides/deploy-a-nextjs-site.md Outdated Show resolved Hide resolved
Co-authored-by: Igor Minar <i@igor.dev>
Co-authored-by: James Culveyhouse <jculveyhouse@gmail.com>
Co-authored-by: James Culveyhouse <jculveyhouse@gmail.com>
@dario-piotrowicz
Copy link
Member Author

Closing this PR in favour of #12901

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

Successfully merging this pull request may close these issues.

4 participants