Skip to content

[Phase 1] Configure and test CI/CD pipeline (docs-deploy.yml) #96

@afucher

Description

@afucher

Set up the GitHub Actions workflow to build the library, copy the bundle, build the Astro site, and deploy to AstroDraw/astrodraw.github.io via deploy key.

Deliverable

A fully functional CI/CD pipeline that deploys the docs site to https://astrodraw.github.io/ on every push to main.

Acceptance Criteria

  • One-time setup completed (§8 in docs-plan.md):

    • SSH key pair generated (docs_deploy_key and docs_deploy_key.pub)
    • Public key added as Deploy Key in AstroDraw/astrodraw.github.io repo (with write access)
    • Private key added as DOCS_DEPLOY_KEY Actions secret in AstroDraw/AstroChart repo
    • Local key files deleted
  • .github/workflows/docs-deploy.yml created with:

    • Trigger: push to main, paths: website/** and project/src/**
    • Allow manual trigger via workflow_dispatch
    • Single job: build-and-deploy
    • Steps: checkout → Node 20 → build library → copy bundle → build Astro → deploy via peaceiris/actions-gh-pages
  • Workflow YAML is syntactically valid (no validation errors)

  • Manual test:

    • Run workflow manually via GitHub Actions UI
    • Verify build logs show:
      • "Build library" succeeds
      • "Copy bundle" succeeds
      • "Build Astro site" succeeds
      • "Deploy to astrodraw.github.io" shows git push output
  • Deployment verification:

    • Visit https://astrodraw.github.io/ in browser
    • Verify homepage loads (title, hero, demo chart visible)
    • Verify navigation sidebar visible and clickable
    • Check browser console: no 404s for /astrochart.js
  • Documentation:

    • Update CONTRIBUTING.md (or create docs-deploy.md guide) explaining:
      • What the workflow does
      • How to manually trigger
      • How to debug deploy failures

Related Plan Section

docs-plan.md §8 (GitHub Pages Deployment), §9 (CI/CD Pipeline)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions