How to show new website design to client from a github branch - github

I have created a website for a friend which I have published on GitHub and deployed using Netlify.
However as my knowledge is improving I have created a branch off of the main repository and completely redesigned the site.
How can I now show this to my friend remotely?
As I understand if I commit this to main this will change the published website which I do not want to do yet as the changes haven't been agreed?
Is there a way to create a GitHub page from that branch so I can send him a link to view what I have created?

Ideally, you create a second empty GitHub repository in which you push tour second branch.
You can then build the GitHub pages for that second repository (using GitHub Action workflow and a starter workflow), and show the alternative version, using the second GitHub Pages URL.

Related

How can I change the default page in github pages?

I am creating a small website project and I started using GitHub pages to have it published there. The thing is that after having all my project in a github repo and decided to change my main page but I am not sure got to do it on github pages.

Create custom tabs on github repo page

I recall I can create a custom tab on github repo page as shown in documentation below
It is set through custom tabs as shown below
But when I get to the github page, I cannot find the Custom Tabs. Did I miss anything, or is the Custom Tabs not available for personal Github repo, and just available on Organization Repo?
It's currently only available on GitHub Enterprise Server and GitHub AE.

How can I track github pages with Google analytics 4 - measurement ID?

I have a repo with README.md as main page. This repo uses mkdocs for generating static site. Also, added Google Analaytics measurement ID to the mkdocs.yml for tracking the traffic on the static site.
But my current requirement is to track the github pages on repo. I am aware of github insights feature where we can get the metrics. But would need more details for every github page.
Can someone help me with this please?
You already use Google Analytics to track your GitHub Pages website, but you want it to track your repo also, right?
In that case, it is not possible, because differently from your website, even if you do own the repo, you do not own it's page, GitHub does. And you probably added some HTML to track your website, but you can't change your repo's HTML. This was already answered here.
Now, if I misunderstood and what you want is to track your GitHub Pages website, then yes, you can.

Syncing file and folder from a live website to a GitHub pages repository

I have:
created a simple portfolio with a third party website content creator;
I put the html code into a brand new GitHub Pages repository, so I've create a simple copy that's seems work fine.
Now I'd like to know how do I do to syncing and update the files and folder of the Github Pages repository every time I make a change onto the live website.
Is there a command line tools?
The normal update workflow for a GitHub page site is:
you modify your pages in your local cloned repository, with your third party website content creator
add, commit and push
wait a few second and refresh the page: your changes should be there.

Is there a better way to get the folder structure of a repo than using Github api when using Github pages?

I am trying to build a portal using Github pages and I want the buttons in my page to be generated based on what folders are present in Github repo, one way is to use Github api to get the tree, I was wondering if there was a way to do this using JavaScript and Github pages.
I don't want to use the API if I don't have to and since I am working with Github pages anyway, I was hoping there was a way to get the folder structure of a repo, using that.