GIT & VERSION CONTROL · REFERENCE
Publishing and Automation
A repository stores source history. A deployment serves a selected version of the website to visitors.
At a glance
| Term or command | What it means | When to use it |
|---|---|---|
| Repository hosting | Stores Git history and platform records. | Use for source sharing, review, and collaboration. |
| Website hosting | Serves browser-accessible website files. | Use when visitors need a public or controlled-access URL. |
| Workflow / pipeline | Configured automated steps triggered by an event. | Run checks or deploy a site when a change is pushed or merged. |
| CI | Continuous integration: automated checks on changes. | Detect problems before or during integration. |
| Deployment | Releases a chosen version to a hosting environment. | Make the site update visible to visitors. |
| Artifact | Output packaged by a workflow. | Deploy the files produced or collected for the site. |
Commands are examples, not an interactive terminal. Run them in your own learning repository after checking the prerequisites. Output, paths, commit IDs, and wording can vary. Host-specific instructions are labeled.
Source code and a live site are different
Edit → Commit → Push to repository
↓
Workflow runs
↓
Check / package
↓
Deploy to hosting
↓
Visitor sees site
A successful push means the remote accepted commits. It does not prove a website deployed. Some repositories have no deployment configured at all. A private repository also does not automatically imply a private website; verify source and site access separately.
GitHub Pages example
GitHub Pages serves static website files such as HTML, CSS, and images from a configured publishing source. A project site commonly has an address shaped like the example below. It is an example address, not a link to your own project.
https://YOUR-NAME.github.io/my-website/
In an existing GitHub repository, choose a publishing source under Settings → Pages. A simple site can publish from a selected branch and folder, or use GitHub Actions. For an Actions setup, a workflow normally checks out the source, collects the web files, uploads a Pages artifact, and deploys it with the required permissions.
What changes on another host?
GitLab has GitLab Pages, and Codeberg documents Codeberg Pages. Other website hosts can deploy source from supported Git services. The configuration, account limits, and access controls vary. Core Git commits still work the same; the deployment service and workflow syntax are the platform-specific pieces.
Check the complete result
After pushing, inspect the correct workflow run for your commit. Read a failed step’s log rather than repeatedly pushing unchanged files. After deployment, open the live URL and check the changed content, linked pages, styles, and images. A cached browser page may need a refresh.
GitHub Pages is static hosting. An HTML form does not automatically acquire a server to process submissions, and a repository host does not automatically provide a backend for arbitrary code.
Why a project path matters
A project site can live under /my-website/ rather than the domain root. Relative links such as css/styles.css preserve that project prefix. A leading slash such as /css/styles.css starts at the domain root and can break the reference. Test the published address as well as local files.
Sources and further reading
Study questions
Explain it in your own words, then open the answer.
Does a successful push prove deployment succeeded?
No. Check the deployment workflow and the actual live site.
Are repository hosting and website hosting the same service role?
No. One stores source history; the other serves the website. A platform may offer both.
Does Git require CI?
No. Automated checks are additional workflow tools.
Can a static HTML form process and store submissions by itself?
No. That needs a suitable processing service or backend.
Why can a leading slash break a project-site stylesheet?
It starts at the domain root rather than beneath the project’s path.