"Deployment Basics (3/7) — Deploying with GitHub: repository, Pages, and Actions"

GitHub can look like one thing from the outside. In practice it plays at least three different roles in a deployment flow.


Key Takeaways

  • A GitHub repository is the source-of-truth layer for code, history, branches, and pull requests.
  • GitHub Pages is a static-site publishing feature.
  • GitHub Actions is the automation engine for CI/CD workflows.
  • Static sites may need only Pages, but once validation or multi-platform deployment matters, Actions becomes important.

1. Repository: the starting point

A repository is not the deployed result. It is the origin point from which deployment becomes possible.

That matters because most deployment platforms watch GitHub. Vercel, Railway, and Streamlit Community Cloud commonly begin by connecting to a GitHub repository and tracking a branch.

2. GitHub Pages: publishing static output

GitHub Pages is best for static sites such as docs, landing pages, portfolios, and simple blogs.

According to the official docs, you can publish Pages content either by:

  • choosing a branch or /docs folder as the source
  • using a custom GitHub Actions workflow to build and deploy

Pages is not a generic long-running app host. If your project needs a server process, queue consumer, or persistent API runtime, Pages is the wrong mental model.

3. GitHub Actions: workflow automation

GitHub Actions is GitHub's CI/CD platform. Workflows live in .github/workflows as YAML files and respond to events such as push, pull_request, and workflow_dispatch.

This is the common shape:

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm test

Even without direct deployment steps, this gives the release flow a validation layer.

4. Pages vs Actions

They are complementary, not interchangeable.

Item GitHub Pages GitHub Actions
Primary role publish static site output automate build, test, release
Input static files workflow definition
Best fit docs, portfolio, simple site CI, deployment, release automation
Can stand alone often yes usually paired with a deployment target

You can absolutely use both: Actions builds or validates, Pages exposes the static result.

5. When GitHub alone is enough

GitHub by itself is a strong starting point when:

  • the site is static
  • there is no always-on backend
  • one public URL is enough
  • you do not need much runtime control

Once your application needs preview environments, running services, or deeper environment management, additional platforms become a better fit.

6. Beginner questions that cause confusion

"I uploaded my code. Why is there no website?"

Because repository hosting and public deployment are different steps.

"If I use Actions, do I still need Pages?"

Sometimes yes. Actions automates. Pages publishes static content.

"Is GitHub Pages free?"

As of the GitHub docs verified on 2026-05-18, GitHub Pages is available on public repositories with GitHub Free. Private-repository use depends on plan type.

References

  • GitHub Docs, Understanding GitHub Actions — https://docs.github.com/en/actions/get-started/understand-github-actions
  • GitHub Docs, Deploying with GitHub Actions — https://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/control-deployments
  • GitHub Docs, Configuring a publishing source for your GitHub Pages site — https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site
  • GitHub Docs, Using custom workflows with GitHub Pages — https://docs.github.com/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages

This is Part 3 of the Deployment Basics series. Next: auto-deploying frontend apps with Vercel.

๋Œ“๊ธ€

์ด ๋ธ”๋กœ๊ทธ์˜ ์ธ๊ธฐ ๊ฒŒ์‹œ๋ฌผ

Agent Memory Engine (2/10) — Building an AI Agent Memory System with SQLite Alone

"ML Foundations (9/9) — PyTorch vs TensorFlow, and the Road to Local LLMs"

"RAG Core Study (14/26) — Evaluation Sets with RAGAS & DeepEval"

"ML Foundations (8/9) — Deep Learning Architectures: CNN, RNN, Attention"

"ML Foundations (7/9) — Deep Learning Training: Optimizers, Regularization, Initialization"

OpenClaw to Hermes Migration (2/13) — What to Preserve, Partially Port, or Discard

AI Agents I Built (5/7) — Building an Automated Blogger API Publishing System