gitdgr1 / group_project

0 stars 2 forks source link

Try out GitHub Actions #99

Closed gitdgr1 closed 8 months ago

gitdgr1 commented 8 months ago

This work item will be closed without a Pull Request. For an explanation of why, read thru the following exchange with ChatGPT:

From Dinesh

Ok, I'm a little confused - even though I've successfully rendered my repo - which consists of html pages and assets - at https://.github.io/

Here's why - everything I've done is in the gh-pages branch - so the main branch has not been affected. I guess that the Pages URL is rendering because it is looking at the gh-pages branch.

And, if changes are made the main branch - that will trigger Actions to re-run deploy.html - which then updates the Pages site.

So, do I not need to merge the gh-pages branch into main, ever?

From ChatGPT

ChatGPT You've grasped the situation correctly! Let me clarify a few points:

  1. Pages Rendering from gh-pages Branch:

    • GitHub Pages is indeed rendering your site from the gh-pages branch, as this is the default behavior when you configure GitHub Pages to use a branch other than main.
    • When you access https://.github.io/, GitHub Pages serves the content from the gh-pages branch, so any changes you've made there will be reflected in the rendered site.
  2. Workflow Trigger and Updating Pages Site:

    • Changes made to the main branch will trigger your GitHub Actions workflow, which you've configured to deploy changes to the GitHub Pages site from the main branch to the gh-pages branch.
    • This means that whenever you push changes to the main branch, the Actions workflow runs, updating the content of the gh-pages branch, and consequently, your GitHub Pages site.
  3. Merging gh-pages Branch into main:

    • Since GitHub Pages is already rendering your site from the gh-pages branch, there's typically no need to merge the gh-pages branch into the main branch.
    • Keeping the gh-pages branch separate from the main branch ensures a clear separation between your source code (in the main branch) and the content being served on the GitHub Pages site (in the gh-pages branch).

So, in summary: