An open API service indexing awesome lists of open source software.

https://github.com/kogosoftwarellc/gpub

Deploy github sites with ease.
https://github.com/kogosoftwarellc/gpub

Last synced: 11 months ago
JSON representation

Deploy github sites with ease.

Awesome Lists containing this project

README

          

[downloads-image]: http://img.shields.io/npm/dm/gpub.svg
[npm-url]: https://npmjs.org/package/gpub
[npm-image]: http://img.shields.io/npm/v/gpub.svg

gpub [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url]
======================
> Deploy github sites with ease.

## Installing

`npm install -g gpub`

## Process

1. clean the working copy.
1. checkout the source branch.
1. install npm dependencies.
1. run `npm run-script build`.
1. move `dist/` to a temporary directory.
1. checkout dist branch.
1. remove contents.
1. copy `dist/` contents
1. commit changes
1. push to remote dist branch
1. 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 ` (required) - `` must be a directory.
* `--src-branch ` (defaults to `master`) - `` must be an existing branch.
* `--dist-branch ` (defaults to `gh-pages`) - `` must be an existing branch.

### Example

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

## License

ISC