Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nfischer/deploy-gh
:shipit: A simple script to deploy master branch to github pages
https://github.com/nfischer/deploy-gh
Last synced: about 2 months ago
JSON representation
:shipit: A simple script to deploy master branch to github pages
- Host: GitHub
- URL: https://github.com/nfischer/deploy-gh
- Owner: nfischer
- License: mit
- Created: 2016-06-10T00:08:22.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2022-01-10T02:31:31.000Z (about 3 years ago)
- Last Synced: 2024-10-14T12:38:08.645Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deploy-gh
[![npm version](https://img.shields.io/npm/v/deploy-gh.svg?style=flat-square)](https://www.npmjs.com/package/deploy-gh)
A simple script to deploy your GitHub project's main branch to GitHub pages.
See this package in action [here](https://nfischer.github.io/deploy-gh).
## Installation
```
npm install --save-dev deploy-gh
```## Usage
This script makes a best effort attempt to pick out your GitHub project's main
branch (this prefers `main` if that branch exists, otherwise it falls back to
`master`). Then it merges this into the `gh-pages` branch and pushes this back
to the remote origin.First, make sure you have an `index.html` file in the root of your repository.
Next, inside `package.json`:
```json
"scripts": {
"test": "... whatever you normally have here ...",
"deploy": "deploy-gh"
},
```To run this, make sure all changes are committed on your main branch and then
run `npm run deploy`.