How do I update my Hugo site locally and make sure that the live site (hosted on GitHub pages) reflect the changes? - github

Let me start by saying that I'm very new to this. I have little to no technical background, so this might just be a simple problem, or I did something I shouldn't have done. It's my first time using the command line and dealing with static pages.
I recently deployed my Hugo site to GitHub pages. I only changed the configuration file, and that's it. (I followed this and this.)
The site is now live at https://USERNAME.github.io/. It's still showing the content of my chosen theme.
A few hours after deploying, I edited some of the local markdown files and pushed the changes. However, the changes aren't reflected on the site.
Now that I realize it, GitHub only displays my site's "public" folder and not all of the files in my local folder.
So, my question is, how can I change and update my site content locally and make sure that the changes are shown on the live site?
Any help is appreciated. Thanks so much!

Related

I'm new to github and I can't get my repositories on github pages

I'm new, reaaaally new to github, not familiar at all, just created an account (by watching one old youtube tutorial). And this is my first time here too. Also, english isn't my first language, so I'm sorry for any mistakes.
I'm using the desktop GitHub, I'm not using Git right now (but also the tutorial guy wasn't and it worked easily) and pushing my local repositories to my online github, and it worked. There are four repos and all of them are public. Yet, when I go to my username.github.io there is nothing, it doesn't exist, that's one thing to fix.
Do I have to create some file? I don't understand, there are youtube videos that say you have to choose a theme, but it's been updated I guess because the website it's not like that anymore, and it doesn't show me themes or anything like that.
I've seen a lot of youtube videos and done exactly what they have done, i've read the github guidelines but i think they are confusing, but i tried a lot of different things. If it makes any difference, my repositories only have like .html and css files (plus the images, fonts, html and css stuff). I don't know anything other than hmtl and css yet, not even javascript, so that's it.
So I don't know how to proceed, I've extinguished my completly amateur resources by doind this post, and I'm learning by myself so I have no one to help me here. Also, since I've never had any contact with github, im just "github dumb", I don't know how branchs work, I'm sorry, I know what a branch is, but somehow that plataform makes it hard.
Anyway, I want to know why my username.github.io doesn't work...
Any help, please? :')
First, create a github repository of <username>.github.io and put your html/css files there. Then go to the repository settings and find the "pages" settings at the left.
In the source, select "deploy from branch" and select your main branch and select the root directory and click save.
That's it, your repository will be published to github pages and you can see the url at the top of the page.
I have attached a screenshot if it is difficult to follow.
The same information can be found here.

Deployments dissappear after a couple of hours. Cirlce Ci, Nuxt, Dream Host

I just started working on a project that was created with Nuxt and a CI pipeline using Cirlce CI that detects changes in the repository and upload files via SFTP to DreamHost.
We also have a netlify cms setup that sends .md files to the repository that are read and displayed on the page.
Now to the weird part.
Whenever I change something in the repository (push from my local repo, or use the cms) the changes appear on the site as they should. They correctly trigger a rebuild within circle.ci, which completes successfully and when I look at the live site they are present.
However when checking back a couple hours later they have dissapeared. The changes are still present in the github repository, but they are inconsistent with the state of the live page which has reverted to its previous state.
I can manually trigger rebuilds within circle.ci but the same thing occurs, i can see the changes for some time, then they dissapear.
I don't even know where to start looking for the problemect.
Any leads, or well aimed shots in the dark would be greatly appreciated, many thanks!
Edit.
I think this might be relevant: Every 12 hours we trigger a rebuild on the page, mostly to check for outdated content and deliver freshly rendered pages. When i checked the site index under the _nuxt pages, i see the following:
There are older versions of the scripts that are correct and new versions that are incorrect, those new versions are then referenced, resulting in the content being false.
Why are the automatic rebuilds 'overwriting' the old build?
Where can i find out more about those triggers?
OP's issue was mainly coming from the fact that the app was pulling from the wrong branch.
Fixing that one, did it.

Gh-pages not displaying the right thing

I'm having some issues with getting the proper page to display. I've looked up different answers and they don't seem to be working for me.
https://github.com/samus94/portfolio2.1
Please let me know what I've done wrong here.
It was displaying the readme before, and I think it still is.
First, You've posted a link to your GitHub repository, not your GitHub Page. The address for GitHub pages always looks like https://<yourname>.github.io/<reponame>.
To get this URL you can go into the settings for your repo and find the GitHub Pages section. Make sure you have GitHub Pages enabled, then look for the URL your site is published at.
Finally, GitHub Pages requires your repository have a very specific structure. It expects there to be an index.html file at the root of the repository. This means you have to either move everything in your /src directory to the root, or move the index.html and update the URLs to your javascript and CSS.
All of these requirements are outlined clearly in the GitHub Pages documentation.
Deploying static HTML + CSS + JS sites (NO jekyll) to Github Pages,
using Github Actions was harder than I though.
Theres is very few quality documentation about this specific topic, except this one:
Steps overview:
Setup a custom action in github
Push changes and the action executes automatically
Your page is deployed to github pages
One important thing: I had no need of changing any property in the yml; don't worry about customizations.

github web Repository blocks with : Fetching latest commit…

While I was editing README.md in one of my repositories, the process blocked somehow.
Since then, when I access that repository, status stays in 'Fetching latest commit… ' and I am not able to upload any files or edit them on the web.
The other repositories work. I do not have this repository on my computer (i have the files obviously), and the system does not allow me to clone it, not even delete it.
What can I do to regain access?
THOUGH DEFINITELY it does not the answer your question, but I want to post a solution for whom have the same problem but because of different reason.
For Forecomers having the issue
I had the same issue(just reached this question by googling), and I remembered disabling the javascript of my browser. Why don't you enable the javascript of your browser and refreshing the page? In my case the problem was solved after enabling javascript.

Unedited files not showing up in repository?

Very new to Github and I downloaded the desktop application in hopes of understanding it better. What I'm trying to do is commit/push files by dragging them into my repository folder, but they don't show in application when moved? I tried editing a txt file and as soon as I save it, it appears. I don't want to have to edit every file I add to my repository as I edit it elsewhere. How do I make the non-edited, dragged-and-dropped files appear?
Also, is there an official GitHub support forum? I can't find anything on their website where you can ask questions/etc and I'm not sure StackOverflow is the best place for this question.
Thanks!
That's the way how git works. It doesn't make sense to add every time the unedited files.
When it notices you added/edited/removed files, git will know that.
I pasted a file (blocks.gif) in my repository and in GitHub Desktop it I see the following (click the 1 uncommitted change) and you should see the new files there. Then you can write a commit message and commit the changes.
Also, is there an official GitHub support forum?
When you need help using GitHub, you can always contact the support team (or write an email to support#github.com). They are awesome people. :)
https://github.com/contact