npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@org-press/deploy-github-pages

v0.9.12

Published

GitHub Pages deploy adapter for org-press

Readme

@org-press/deploy-github-pages

GitHub Pages deploy adapter for org-press.

Deploys static sites to GitHub Pages by pushing to the gh-pages branch.

Installation

npm install @org-press/deploy-github-pages
# or
pnpm add @org-press/deploy-github-pages

Usage

Basic Usage

import { githubPagesAdapter } from '@org-press/deploy-github-pages';

export default defineConfig({
  deploy: {
    adapter: githubPagesAdapter({
      repo: 'user/my-site',
    }),
  },
});

With Custom Domain

import { githubPagesAdapter } from '@org-press/deploy-github-pages';

export default defineConfig({
  deploy: {
    adapter: githubPagesAdapter({
      repo: 'user/my-site',
      cname: 'mysite.com',
    }),
  },
});

Full Configuration

import { githubPagesAdapter } from '@org-press/deploy-github-pages';

export default defineConfig({
  deploy: {
    adapter: githubPagesAdapter({
      // GitHub repository (user/repo or org/repo format)
      // If not specified, auto-detects from git remote
      repo: 'user/my-site',

      // Target branch (default: 'gh-pages')
      branch: 'gh-pages',

      // Custom domain for CNAME file
      cname: 'mysite.com',

      // Add .nojekyll file (default: true)
      // Recommended for pre-built static sites
      noJekyll: true,

      // Commit message (default: 'Deploy to GitHub Pages')
      message: 'Deploy docs from CI',

      // Remote name (default: 'origin')
      remote: 'origin',
    }),
  },
});

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | repo | string | Auto-detected | GitHub repository in user/repo format | | branch | string | 'gh-pages' | Target branch for deployment | | cname | string | - | Custom domain (creates CNAME file) | | noJekyll | boolean | true | Add .nojekyll file to disable Jekyll | | message | string | 'Deploy to GitHub Pages' | Git commit message | | remote | string | 'origin' | Git remote name |

How It Works

The adapter deploys your site by:

  1. Adding a .nojekyll file (optional, recommended)
  2. Adding a CNAME file if a custom domain is configured
  3. Initializing a new git repository in your build output directory
  4. Committing all files
  5. Force pushing to the gh-pages branch on GitHub

This approach ensures a clean deployment each time without accumulating history.

Auto-Detection

If repo is not specified, the adapter attempts to auto-detect the repository from your git remote:

# Supports both HTTPS and SSH remote URLs:
https://github.com/user/repo.git
[email protected]:user/repo.git

Dry Run Mode

Test your deployment without actually pushing:

const result = await deploy({
  adapter: githubPagesAdapter({ repo: 'user/repo' }),
  dryRun: true,
});

console.log(result.url); // Predicted GitHub Pages URL

GitHub Pages URL

The adapter returns the correct URL based on your repository:

  • User/Org pages (username.github.io): https://username.github.io
  • Project pages (user/project): https://user.github.io/project
  • Custom domain: https://your-domain.com

Requirements

  • Git must be installed and available in PATH
  • Push access to the target repository
  • For private repos, appropriate authentication (SSH key or token)

CI/CD Example

GitHub Actions

name: Deploy to GitHub Pages

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v4

      - uses: pnpm/action-setup@v2
        with:
          version: 8

      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: 'pnpm'

      - run: pnpm install
      - run: pnpm build

      - name: Deploy
        run: pnpm deploy
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

License

GPL-2.0