gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.15k stars 10.33k forks source link

Need warning in docs about bumping master branch during deployment to gh pages #24479

Closed Ildarik closed 4 years ago

Ildarik commented 4 years ago

Recently I faced same issue as described here Maybe we need some sort of warning or tip in docs about that issue?

Short description of the problem: We are developing something on the master btanch as usual. And want to deploy it on Github Pages. We see in the documentation how to do that in Gatsby world but don't pay attention to that we are bumping our master branch. So I would suggest adding a tip to checkout master branch to source branch before running npm run deploy.

LekoArts commented 4 years ago

Hi, thanks for the issue!

What issue did you face? The issue you linked is working as intended and the docs explain this usecase.

Ildarik commented 4 years ago

@LekoArts added description of the problem

LekoArts commented 4 years ago

Reading your updated comment I feel like you should follow these instructions, right? https://www.gatsbyjs.org/docs/how-gatsby-works-with-github-pages/#deploying-to-a-path-on-github-pages

Because with this script you'll always deploy to another branch than master

Ildarik commented 4 years ago

No, correct link is https://www.gatsbyjs.org/docs/how-gatsby-works-with-github-pages/#deploying-to-a-github-pages-subdomain-at-githubio

GH pages forces to deploy to master branch for user\organization pages.

LekoArts commented 4 years ago

Ah, I see!

Documenting those two options (https://github.com/gatsbyjs/gatsby/issues/13120#issuecomment-479932834) sounds reasonable. Would you be up for opening a PR adding this? :)

Ildarik commented 4 years ago

Sure! I'll do it today a little bit later! Thanks!)