No '\docs' folder was found to build GitHub Pages message - github

I'm new here.
I'm learning Git and Github and here's my first question : I got this message in my e-mails because in my settings on Github I've chosen for the source branch:main and folder: /docs
The page build failed for the main branch with the following error:
No /docs folder was found to build GitHub Pages. Check the source
setting for this repository. For more information, see
https://docs.github.com/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites#missing-docs-folder.
My question is why do i have this message ? I know that I have to create a docs folder or chose root folder but where do I have to create it (if I have to)? And do I have to create it ?
Sorry, it's maybe a noob question ... I just want to understand why.
I resolved this problem by choosing folder /root but I just want to understand...
Can you help me please ? ^^

Related

Unable to host project to GitHub Pages

My repo: https://github.com/shoegazzz/simple-trello-clone
When following a link https://shoegazzz.github.io/simple-trello-clone/ :
404 File not found The site configured at this address does not contain the requested file. If this is your site, make sure that the filename case matches the URL. For root URLs (like http://example.com/) you must provide an index.html file. Read the full documentation for more information about using GitHub Pages.
I read the documentation, watched videos and discussions on the topic, renamed the repository to the username, but it still does not work. Tell me what should be done here?
first things first: please leverage the usage of the .gitignore file (in the root directory of your repository). You can copy-paste the content provided in this file: https://github.com/github/gitignore/blob/main/Node.gitignore into your .gitignore file. This will ignore the node_modules directory from getting staged and ultimately from getting pushed into the repository.
Now, the problem you described occures when there is no information for GitHub Pages. GitHub Pages is searching for an index.html which isn't there, as by default GitHub Pages is watching the root directory of your repository.
Please have a look at GitHub Actions to Deploy your project to GitHub Pages. This is the best source I could find in a short matter of time: https://github.com/gitname/react-gh-pages
If you have any follow-up questions, feel free to ask.
TL;DR: You need to provide the built static-website content for GitHub Pages to work with.

Github Build and Deploy Error: No uploaded artifact was found

I am trying to deploy a github.io blog but having an issue with build and deployment. I can build the files without any issue on local server, but when I try to publish it on github server by pushing it, it throws a build and deployment error saying:
Error: Error: No uploaded artifact was found!
Here's my git repo link for more info: https://github.com/dailyole/dailyole.github.io/runs/4677505925?check_suite_focus=true
I was able to publish the same files on github.io without an issue a few weeks ago, but it throws an error now.
In my case my problem was caused by some bad submodule references:
https://github.com/catalin-hritcu/catalin-hritcu.github.io/actions/runs/1643762494
No url found for submodule path 'teaching/epit2018' in .gitmodules
This seems to be a common issue these days:
https://github.community/t/failed-to-publish-static-site-spa-with-submodules/219880
It fixed it with some commands like this:
git rm --cached teaching/epit2018
This doesn't seem the problem for you though.
solved it by change the theme of blog.
methed 1: change it in web by settings.
On GitHub, navigate to your site's repository.
Under your repository name, click Settings.
settings
In the "Code and automation" section of the sidebar, click "Pages",
then, click "change theme"
change theme
select one theme, and click "select theme"
select
methed 2: change in the file
vim _config.yml
change the line
theme: jekyll-text-theme
to a new theme, like
theme: jekyll-theme-cayman
: sorry for I need at least 10 reputation to post images
Realized this issue occurs when there is an empty submodule in your GitHub repo. Removed the empty submodule and it's working now.
As far as I can see, your problem is different than mine though:
https://github.com/dailyole/dailyole.github.io/runs/4677504175?check_suite_focus=true
github-pages 223 | Error: The jekyll-theme-hydejack theme could not be found.
I also meet the question, and my git repo is: github-pages 223 | Error: File to import not found or unreadable: mixins/reset-filter.
Then I see the path that have the problem, I found this file isn't uploaded. The folder contains too many files and I didn't check it again. May be you need to check if some files are not uploaded.

Why doesn't my own GitHub page show my project?

This is my first GitHub page; I have created repository and even pasted my project into it, but when I enter the URL it gives me 404 error with "There isn't a GitHub Pages site here" description.
My project called 'weather-app' and the URL: https://salehghari.github.io/
So it should be like this: https://salehghari.github.io/weather-app/weatherapp.html
I checked your repository on Github and all the Builds under Actions are marked as Failure with the following error under Deploy:
Error: No uploaded artifact was found!
Under Build I see this:
Error: fatal: No url found for submodule path 'weather-app' in
.gitmodules Error: The process '/usr/bin/git' failed with exit code
128
You are using a submodule but I don't see a clickable link on the repository, are you sure that is correct ? Check if this submodule is correct, there is also an issue on Github Community about this topic.
You need to configure the branch you want to use for your GitHub pages site.
These are the steps you need to follow
I deleted that repo and created another. that un-clickable folder in previous repo was caused the 404 error. Because I had pushed that folder on GitHub once so it means It had had a .git file in it. Thank you every one I appreciate your helps

Display README.md in repository directories

Github repo I'm referencing: https://github.com/Dallas-Marshall/PersonalProjects/tree/master/discord_bot
I have a Personal Projects Repository on Github and have a README.md file in the root folder explaining the repo. However, the issue I am having is that inside a directory of the repo I have created another README.md file to explain that specific project but Github is not displaying it.
I have ensured the file is named correctly, is up to date on Github and have scanned settings to try and find an option to display it to no avail as yet.
Does anyone know how to get this file to display when viewing the directory that I have linked above.
Many Thanks,
Dallas Marshall
Your readme in the linked repo folder is empty. GitHub will start displaying it once it got content in it.

GitHub Pages 404 when trying to host Polymer Starter Kit

So I'm simply trying to host the polymer-starter-kit on git pages which should be easy enough in theory there's already a simple tutorial for how to do so here. The problem is after following all the instructions and navigating to my SKHolmes.github.io I get a 404 from github saying it couldn't load the resources, be that one or many. I can clearly see there is an index.html file in the root directory.
Here is the error
Here is my repository
Has anyone had a similar problem? Is there any tricks I'm missing?
Did you read the gh-pages doc? When you want username.gitub.io you need to push to the ´master´ branch, not the 'gh-pages' branch.