gpub

0.5.8 • Public • Published

gpub NPM version Downloads

Deploy github sites with ease.

Installing

npm install -g gpub

Process

  1. clean the working copy.
  2. checkout the source branch.
  3. install npm dependencies.
  4. run npm run-script build.
  5. move dist/ to a temporary directory.
  6. checkout dist branch.
  7. remove contents.
  8. copy dist/ contents
  9. commit changes
  10. push to remote dist branch
  11. checkout source branch

Prerequisites

  • You'll execute this script as a user with push/pull access to the repository.
  • Your project is compatible with npm.
  • You have a build script defined in your package.json.
  • You have git installed.
  • Your build script outputs a dist directory.
  • If you're on a mac, you'll need to have GNU's readlink on your path (google homebrew gnu readlink for more info).

Usage

gpub [OPTIONS]

Options

  • --repo-dir <path> (required) - <path> must be a directory.
  • --src-branch <branch> (defaults to master) - <branch> must be an existing branch.
  • --dist-branch <branch> (defaults to gh-pages) - <branch> must be an existing branch.

Example

gpub --repo-dir /tmp/some-repo-dir --src-branch src --dist-branch master

License

ISC

Package Sidebar

Install

npm i gpub

Weekly Downloads

1

Version

0.5.8

License

ISC

Last publish

Collaborators

  • jsdevel