5.2.13 • Published 11 months ago

@dvirtz/semantic-release-gh-pages-plugin v5.2.13

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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

CI Test Coverage Maintainability npm (tag)

gh-pages publishing plugin for semantic-release

StepDescription
verifyConditionsVerify the configuration.
publishPushes commit to the documentation branch

Install

# yarn
yarn add @wiki/semantic-release-gh-pages-plugin --dev
# npm
npm i @wiki/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",
      "@wiki/semantic-release-gh-pages-plugin"
    ],
    "publish": [
      "@semantic-release/npm",
      "@semantic-release/github",
      [
        "@wiki/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",
      "@wiki/semantic-release-gh-pages-plugin"
    ]
  }
}

Configuration

Environment variables

VariableDescription
GH_TOKEN or GITHUB_TOKENOptional. 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
branchesOptional list of src-to-target branches association. If defined it suppresses branch option. For example, [['master', 'gh-pages'], ['beta', beta-docs]]undefined
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
patterngh-pages src option**/*

License

MIT