Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

deploy-to-github-pages

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deploy-to-github-pages

A Node library that makes deploying a directory on a branch to GitHub pages easy and automatic.

  • 1.0.0-beta.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
60
decreased by-58.62%
Maintainers
1
Weekly downloads
 
Created
Source

:rocket: deploy-to-github-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-to-github-pages

Usage

CLI

deploy-to-github-pages [...options]

Node

const deploy = require('deploy-to-github-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-to-github-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.

Keywords

FAQs

Package last updated on 01 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc