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.
- Host: GitHub
- URL: https://github.com/kogosoftwarellc/gpub
- Owner: kogosoftwarellc
- License: isc
- Created: 2015-11-11T09:40:41.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-11T10:32:57.000Z (about 10 years ago)
- Last Synced: 2025-02-07T16:14:32.378Z (11 months ago)
- Language: Shell
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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