1.0.0 • Published 3 years ago

@dougkulak/semantic-release-gh-pages-plugin v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@dougkulak/semantic-release-gh-pages-plugin

Build Status Deps Test Coverage Maintainability CodeStyle npm (tag)

gh-pages publishing plugin for semantic-release

StepDescription
verifyConditionsVerify the presence of the GH_TOKEN set via environment variables.
publishPushes commit to the documentation branch

Install

yarn add @dougkulak/semantic-release-gh-pages-plugin --dev

or

npm add @dougkulak/semantic-release-gh-pages-plugin -D

Usage

Describe plugin configuration in package.json / .releaserc.js

{
  "release": {
    "branch": "master",
    "verifyConditions": [
      "@semantic-release/changelog",
      "@semantic-release/npm",
      "@semantic-release/git",
      "@dougkulak/semantic-release-gh-pages-plugin"
    ],
    "publish": [
      "@semantic-release/npm",
      "@semantic-release/github",
      [
        "@dougkulak/semantic-release-gh-pages-plugin",
        {
          "msg": "updated",
          "branch": "docs"
        }
      ]
    ]
  }
}

or even shorter if default settings are used:

{
  "release": {
    "branch": "master",
    "plugins": [
      "@semantic-release/release-notes-generator",
      "@semantic-release/changelog",
      "@semantic-release/git",
      "@semantic-release/github",
      "@semantic-release/npm",
      "@dougkulak/semantic-release-gh-pages-plugin"
    ]
  }
}

Configuration

Environment variables
VariableDescription
GH_TOKEN or GITHUB_TOKENRequired. The token used to authenticate with GitHub.
Options
OptionDescriptionDefault
msgCommit message templatedocs updated <%= nextRelease.gitTag %>
srcDocumentation directorydocsNOTE don't forget to run docs builder (yarn docs, yarn typedoc, etc) as a part of your build step or any other way
dstDestination directory. (root)
branchDocs branch to pushgh-pages
repositoryUrlRepository urlinherited from .git
enterpriseDisables host assertion for GitHub Enterprise domainsfalse
pullTagsBranchTarget branch for tags fetching hook. If '' empty string, skips this actionglobalConfig.branch || master
dotfilesgh-pages dotfiles optionfalse
addgh-pages add optionfalse