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

File missing on GitHub-deployed site #15

Closed
TysonMN opened this issue Jun 16, 2020 · 4 comments
Closed

File missing on GitHub-deployed site #15

TysonMN opened this issue Jun 16, 2020 · 4 comments

Comments

@TysonMN
Copy link
Contributor

TysonMN commented Jun 16, 2020

My gh-pages branch contains the file...
https://github.com/bender2k14/tyson-williams-blog/blob/gh-pages/images/TysonWilliams.jpg

...but https://tysonwilliams.coding.blog/images/TysonWilliams.jpg returns 404.

Why is that? Is there some additional debugging technique that I can use to see what files are being served from my GitHub site? I thought it would be all files in the root of my repo for the gh-pages branch, but that is definitely not how it works. In particular even though I deleted the img folder from my gh-pages branch (c.f. #12 (comment)), the file https://tysonwilliams.coding.blog/img/cb-banner-dark.svg is still available.

@loreanvictor
Copy link
Contributor

Your GitHub pages deploys contents of the gh-pages branch of your repository (it seems). Your coding.blog always deploys contents of the default branch of your repository (which is master).

The GitHub pages version of your blog is completely independent of the coding.blog version. You can synchronize them to some degree, but the two hosting environments in the end have different properties/behaviors. This comment is about how to remove a file from your GitHub Pages site, not your coding.blog.

@TysonMN
Copy link
Contributor Author

TysonMN commented Jun 16, 2020

Oh! I only intend to have coding.blog host my site. I thought I also needed the gh-pages branch. I will reread the setup docs to see where I should have learned this.

At least part of the confusion probably came from starting from the template coding-blog-boilerplate, which contains the gh-pages branch, the script to deploy there, and the branching in the configuration file.

@loreanvictor
Copy link
Contributor

Yes I understand, perhaps the wording on some initial documents can be further improved? Due to similar feedback the wording on coding.blog is updated. However, I believe it is crucial for the boilerplate to be also super easy to be deployed to GitHub Pages, just to explicitly outline the fact that coding.blog blogs can be deployed to multiple hosts and it is easy to migrate them. In the long run creators should only stick with coding.blog because it provides added value for them, not because it is hard to migrate away or they don't know how.

@TysonMN
Copy link
Contributor Author

TysonMN commented Jun 16, 2020

Here is an idea.

I wouldn't expect anyone to deploy their site to both coding.blog and to GitHub pages. Therefore, it seems unnecessary to me that the configuration is structured to simulanoously support both uses cases. Instead, the master branch could contain everything except anything specific hosting on coding.blog vs GitHub pages. Then there can be two other branches named something like

  • deploy_to_conding.blog and
  • deploy_to_GitHub_pages

that each contain the changes needed to deploy to their respective environment. Then the docs could say something like:

  1. Copy this template repo.
  2. Merge exactly one of those "deploy branches" into master.

The gh-pages branch can also exist in the repo and somewhere it can say something like "if you merge deploy_to_conding.blog into master, then you can also delete the gh-pages branch."

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

2 participants