Deploy to GitHub Pages
Step-by-step guide to deploy the GetThatQuick documentation site to GitHub Pages.
Prerequisites
The docs site lives in the docs-site/ directory and is built with Docusaurus. The docusaurus.config.ts is already configured with:
url: "https://gurkirat-singh-bit.github.io",
baseUrl: "/Get-that-quick/",
organizationName: "Gurkirat-Singh-bit",
projectName: "Get-that-quick",
Method 1: GitHub Actions (Recommended)
Create the workflow file at .github/workflows/deploy-docs.yml:
name: Deploy Docs to GitHub Pages
on:
push:
branches:
- main
paths:
- "docs-site/**"
permissions:
pages: write
id-token: write
contents: read
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: cd docs-site && bun install
- name: Build
run: cd docs-site && bun run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs-site/build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
This workflow:
- Triggers on pushes to
mainthat modify files indocs-site/** - Installs dependencies and builds the Docusaurus site
- Uploads the
docs-site/builddirectory as a Pages artifact - Deploys to GitHub Pages
Method 2: Manual Deploy
Option A: Using bun run deploy
cd docs-site
bun install
bun run build
GIT_USER=<your-github-username> bun run deploy
This uses Docusaurus's built-in deploy command which pushes to the gh-pages branch.
Option B: Manual branch push
cd docs-site
bun install
bun run build
# Manually push docs-site/build contents to the gh-pages branch
GitHub Settings
For Method 1 (GitHub Actions)
- Go to your repository on GitHub
- Navigate to Settings → Pages
- Under Source, select GitHub Actions
For Method 2 (Manual Deploy)
- Go to your repository on GitHub
- Navigate to Settings → Pages
- Under Source, select Deploy from a branch
- Set branch to
gh-pagesand folder to/ (root)
Access the Docs
Once deployed, the documentation site is available at: