Skip to content

docs: Add GitHub Actions CI/CD workflow for GitHub Pages #31

@shouze

Description

@shouze

Context

Parent epic: #24
Depends on: #25 (VitePress initialized)

Workflow: .github/workflows/docs.yml

Triggers

on:
  push:
    branches: [main]
    paths:
      - "docs/**"
      - ".github/workflows/docs.yml"
  workflow_dispatch:

Job: build

- uses: oven-sh/setup-bun@v2
  with:
    bun-version: latest
- run: bun install --frozen-lockfile
- run: bun run docs:build
- uses: actions/upload-pages-artifact@v3
  with:
    path: docs/.vitepress/dist

Job: deploy (depends on build)

permissions:
  pages: write
  id-token: write
environment:
  name: github-pages
  url: ${{ steps.deployment.outputs.page_url }}
steps:
  - uses: actions/deploy-pages@v4
    id: deployment

Tasks

  • Create .github/workflows/docs.yml with the above structure
  • Enable GitHub Pages in repo Settings → Pages → Source: GitHub Actions
  • Verify the workflow runs successfully on merge to main
  • Verify the site is live at https://fulll.github.io/github-code-search/
  • Add a docs badge to the slim README (docs: Slim down README.md (keep install + link to docs) #32)

Acceptance criteria

  • Merging a PR touching docs/** auto-triggers a deployment
  • The site is accessible at https://fulll.github.io/github-code-search/
  • The workflow uses only official GitHub Actions and oven-sh/setup-bun — no third-party deploy service
  • Build + deploy completes in < 3 minutes
  • Workflow can also be triggered manually via workflow_dispatch

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions