Skip to content

feat: set up GitHub Pages documentation site#85

Open
zp6 wants to merge 1 commit into
sorosave-protocol:mainfrom
zp6:feature/github-pages-docs
Open

feat: set up GitHub Pages documentation site#85
zp6 wants to merge 1 commit into
sorosave-protocol:mainfrom
zp6:feature/github-pages-docs

Conversation

@zp6
Copy link
Copy Markdown

@zp6 zp6 commented May 14, 2026

Summary

Sets up GitHub Pages documentation site for the SoroSave SDK, addressing #21.

Changes

  • Enhanced VitePress docs with comprehensive content:
    • docs/guide/usage.md - New usage guide covering React hooks (useGroup, useContribute, useMemberGroups), wallet integration, batch operations, utility functions, error handling, and CLI usage
    • Updated docs/api/index.md - Complete API reference with all client methods categorized (write/read/batch)
    • Updated VitePress sidebar to include the new Usage page

GitHub Pages Deployment (requires manual step)

The token used does not have workflow scope, so the workflow file could not be pushed. Please create .github/workflows/pages.yml with the following content:

name: Deploy Docs to GitHub Pages

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

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: pages
  cancel-in-progress: false

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: npm

      - name: Install root dependencies
        run: npm ci

      - name: Install docs dependencies
        working-directory: docs
        run: npm ci

      - name: Build documentation
        working-directory: docs
        run: npm run docs:build

      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: docs/.vitepress/dist

  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4

Setup Steps After Merge

  1. Go to Settings ? Pages
  2. Set Source to "GitHub Actions"
  3. Merge this PR
  4. The workflow will automatically build and deploy the docs

Closes #21

- Add docs/guide/usage.md with comprehensive React hooks and CLI usage
- Update docs/api/index.md with complete API overview
- Update VitePress sidebar to include Usage guide

Part of sorosave-protocol#21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up GitHub Pages for documentation site

1 participant