Deploying website on github without index.html file - github

I recently worked on a personal project using React and that included files like: app.js, app.css, index.js and everything worked smoothly. However, when trying to deploy the site, I keep receiving this
error. My main files are within the src directory shown here. On the github pages tab, what should I change the custom domain to so that I can successfully deploy the website?
I've also read somewhere that I can create a dummy index.html file, but I am still deeply confused. Any guidance on how to deploy the site would be greatly appreciated.
Thank you!

This article contains steps needed to deploy react app in github pages.
Article Link: here.

Related

GitHub pages deployment is giving problem as it won't fetch the data file

I've created a simple app, and when I open it locally works correctly. 1
When I deploy to GitHub pages, the deployment works, but for some reason the app isn't fetching the data, so I just have a navbar. 2
Does anyone know why this might be happening? I followed the instructions here: https://docs.github.com/en/pages/quickstart and selected (/root) branch.
When I tried using the /docs branch the app didn't get deployed, it just said "Your GitHub Pages site is currently being built" for a long time (> 20min)...
If helpful, here's the repo: https://github.com/ghersf91/chocostore
Thank you.

"Site has not yet been deployed" after netlify deployment

I already tried a million times and not able to figure out where I am going wrong. I tried simple static website repo. I even added parcel bundler. I just get same error message.
I even forked netlify's own demo repo. And I got same message. Why I am not able to deploy the site?
I looked at forums, blogs and even answer in this forum and I am not finding clue to this exact message. I didn't have netlify.toml file. I added that file too and I don't see any change in deployment status.
Initially I was trying to just create site online by connecting to GitHub repo. When I tried Netlify-CLI I could see some deploy action happen. But server was not render. Found a guide here: https://github.com/Tanu-N-Prabhu/Multiplication-Table-App
Followed last 3 steps under Deployment section:
Go to your Netlify Dashboard to the project. Click on Site has not yet been Deployed. Again click on Deploy Preview this will unlock the Preview Deploy which is a temporary URL.
After viewing the Preview, click on Publish deploy option to deploy your project.
Now your project is live and deployed on the internet.
These steps worked. But Javascript files were not rendering. I wonder why the whole process is so cumbersome when they advertise everything is taken care by Netlify automatically? There is no document for Site has not yet been deployed on their site and google search only leads me to Page not found forum page.
You must add the --prod.
The command should look like this: netlify deploy --prod.
This fixed it for me.

I am unable to deploy my website to Netlify

I have been creating this website for a few weeks now (I am fairly new to web-dev) and have just recently made a repo (on Github) for it.
Link:
https://github.com/Lathryx/TopShelf-Recipes
I want to deploy with Netlify however I am unable to. Netlify continuously gives a 404 error on the site(s) that I create. I think it has something to do with the publish directory but I'm not sure. I want it to open to landing.html.
The few times I have tried to deploy now I have tried:
No build command/publish directory.
No build command and the publish directory set to TopShelf Recipes
(have also tried /TopShelf Recipes).
No build command and the publish directory set to TopShelf Recipes/landing.html.
No build command and the publish directory set to /TopShelf Recipes/landing.
Image of Error:
I really don't know what to do. Does anybody know why this is happening?
The netlify/my-first-netlify-deploys demo project shows files with a netlify.toml to adtually generates the files.
Result: https://playwith.netlify.app/
But if there are no generation involved, then said files should be directly at the root folder of the repository, not in a subfolder.
The landing page of your site must be titled index.html (as I’ve found), this fixed it for me. Mine (originally) was titled landing.html.
I will keep this in mind in the future.

Correctly hosting Jekyll website on Git Pages

I am desperate.My mission is to deploy a static website generated using Jekyll into GitHub Pages, using the "Project" option (instead of the user option).
Somehow, when I use Jekyll to check the website in my machine, everything works fine. But once I deploy it to Git Pages, all my CSS files stop working, and every link leads to a 404 not found error.
I have followed several guides and tutorials but they all fail:
Using Github Pages to host a website v2
Jekyll Documentation
Building Static Sites with Jekyll
building-a-docs-site-with-jekyll-github-pages
So far I always created the repositories, the branches and I always push everything. I do not believe the error is in the deployment, but in some place else.
My repo can be found here:
Fl4m3Ph03n1x web-tutorials repo
For those of you wondering, so far the repository is only the result of one tutorial:
- AndrewMunssel tutorial
I have also tested other tutorials, but I always end up with a problem. Is my code wrong? Are the tutorials I am following outdated and incorrect? What should I do?
Everything on your site is in a sub directory off of the domain so the main site is accessed here
http://fl4m3ph03n1x.github.io/web-tutorials/
The templates are pointing to directories on the root of the domain so it is trying to load your stylesheets from http://fl4m3ph03n1x.github.io/assets rather than where they are located http://fl4m3ph03n1x.github.io/web-tutorials/assets/ the same thing is happening for your posts.
What you need to do is set the baseurl in your _config.yml
baseurl: /web-tutorials
you then need to modify your templates so that the paths to CSS and JS use the following convention
{{ site.baseurl }}/path/to/css.css
and for post links
{{ site.baseurl }}{{ post.url }}
You also need to update the site setting in _config.yml

How do I self-host Jekyll?

I don't want to use github to host my new portfolio, I want to host it from my own site. How do I do this properly? Clearly, simply uploading all the files don't work (I just see Jekyll template text).
Has anyone done this?
You have to generate the site with Jekyll, and then upload the generated files to your web server. Jekyll's Usage and Deployment docs explain in more detail.