0.2.8 • Published 4 years ago

deploy-directory-on-branch-to-gh-pages v0.2.8

Weekly downloads
43
License
MIT
Repository
github
Last release
4 years ago

:rocket: deploy-directory-on-branch-to-gh-pages

npm GitHub release CircleCI npm

A Node and CLI tool that makes deploying to GitHub pages by branch easy and automatic, best used as part of a CI process.

On master, your directory will be deployed to your GitHub page root similarly to other libraries, such as the wonderful gh-pages. On other branches, it'll be deployed under /branch/${branchName}, allowing your peers to QA your built docs/demos easily for better feedback.

It also sends a status to a Pull request, if one exists:

Installation

npm install -D deploy-directory-on-branch-to-gh-pages

Usage

CLI

deploy-directory-on-branch-to-gh-pages [...options]

Node

const deploy = require('deploy-directory-on-branch-to-gh-pages');

deploy(options).catch(err => { console.log(err); })

Options

Optionflagdescriptiondefaultenv variablerequiredrequired with CircleCI
directory-ddirectory you wish to deploy'public'**
token-tGitHub tokenGITHUB_TOKEN**
owner-oGitHub repo owner/org*
repo-rGitHub repo name*
branch-bbranch name'master'*
buildUrl-ulink displayed when deployment fails

Therefore, if ran from CircleCI with a GITHUB_TOKEN environment variable present and the directory to be deployed is named public, no configuration options are needed, so just the following is enough:

deploy-directory-on-branch-to-gh-pages

or

deploy().catch(err => { console.log(err); })

Contributing

  1. Run tests with yarn test.
  2. Develop.
  3. Bump version number in package.json according to semver and add an item that a release will be based on to CHANGELOG.md.
  4. Submit your pull request from a feature branch and get code reviewed.
  5. If the pull request is approved and the CircleCI build passes, you will be able to squash and merge.
  6. Code will automatically be released to GitHub and published to npm according to the version specified in the changelog and package.json.

Other

For features and bugs, feel free to add issues or contribute.

1.0.0-beta.1

4 years ago

0.2.7

4 years ago

0.2.8

4 years ago

0.2.6

5 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago