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

@mdxe/github

v1.9.0

Published

Deploy MDX projects to GitHub Pages

Readme

@mdxe/github

Deploy MDX projects to GitHub Pages via git push, GitHub Actions, or managed API.

Installation

pnpm add @mdxe/github

Usage

Direct git push (default)

import { deploy } from '@mdxe/github'

const result = await deploy({
  projectDir: './my-project',
  repository: 'user/repo',
  token: process.env.GITHUB_TOKEN,
})

console.log(`Deployed to: ${result.url}`)

GitHub Actions workflow

import { deploy } from '@mdxe/github'

// Generates and commits workflow file
await deploy({
  projectDir: './my-project',
  useActions: true,
})

// Next push will trigger automated deployment

Manually generate workflow

import { setupPagesActions } from '@mdxe/github/actions'

const workflowPath = setupPagesActions({
  projectDir: './my-project',
  buildCommand: 'build',
  outputDir: 'out',
})

Options

await deploy({
  projectDir: './my-project',
  repository: 'user/repo', // Auto-detected from git remote
  branch: 'gh-pages', // Target branch (default: 'gh-pages')
  sourceBranch: 'main', // Source branch for Actions
  outputDir: 'out', // Build output directory
  buildCommand: 'build', // npm script to run
  token: process.env.GITHUB_TOKEN,
  customDomain: 'example.com',
  clean: true, // Clean branch before deploy (default: true)
  preserve: ['.git'], // Files to preserve
})

GitHub API

import { configurePagesApi } from '@mdxe/github'

// Enable and configure Pages via API
await configurePagesApi({
  token: process.env.GITHUB_TOKEN,
  owner: 'user',
  repo: 'repo',
  customDomain: 'example.com',
  enforceHttps: true,
})

Workflow Generation

import { generatePagesWorkflow, generateNextJsWorkflow } from '@mdxe/github/actions'

// Static site workflow
const staticWorkflow = generatePagesWorkflow({
  buildCommand: 'build',
  outputDir: 'dist',
})

// Next.js workflow
const nextWorkflow = generateNextJsWorkflow({
  buildCommand: 'build',
  outputDir: 'out',
})

Environment Variables

  • GITHUB_TOKEN - Personal access token with repo and pages permissions
  • GITHUB_API_URL - Custom managed API URL (optional)

Deployment Methods

  1. Direct Git Push (default) - Clones gh-pages branch, copies files, commits and pushes
  2. GitHub Actions - Generates workflow file for automated deployments
  3. Managed API - Uses oauth.do authentication with managed API endpoint