Skip to content

wix-incubator/gh-pages-auto-release

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-pages-auto-release

This node module will help you to publish your package to dist folder as a github page.

All you have to do is run gh-pages-auto-release in your release script

{
  "name": "package-name",
  "version": "1.0.0",
  "scripts": {
    "build": ":", 
    "test": ":",
    "release": "gh-pages-auto-release",
  },
  "devDependencies": {
    "gh-pages-auto-release": "*"
  }
}

The --git-repo option

By default pages output of your project is pushed to a branch on its own repository (designated by the GIT_REMOTE_URL environment variable). You can change this by pointing to a different repository using the --git-repo option.

For example: gh-pages-auto-release --git-repo git@github.com:wix/my-library-gh-pages

This option is typically used on monorepos that have multiple projects with gh pages. Since github design dictates one-to-one relationship between published pages and the git repository, you should create a separate repository for publishing and pass it using this option.

Your page is automatically re-published every CI build

Once you're build is complete in CI, your page can be accessed at:

https://wix.github.io/package-name/

where package-name is the name you gave your git repository

obvious note: This url will work only if you have dist/index.html file generated by your build.