Show:
Module: AutodocsPublish

Table of Contents

Methods

init ()

Initialisation step for Github Pages

Used to check/ set any Github Pages environment variables

outputUrls ()
private

Outputs the base URL and the API URL at which the documentation should be published.

Uses CNAME file based on best guess, otherwise defaults to *.github/*

run ()

Performs the required steps for publishing to Github pages

  • runs npm run generatedocs
  • git fetches the gh-pages branch of the project into a throwaway git repository
  • copies the documentation generated by the generatedocs script into the gh-pages branch
  • copies any additional files required into the gh-pages branch
  • if any files have changed, git commits git pushes on the gh-pages branch
    • this is when the files actually succeed in publishing
  • if necessary, cleans up the throwaway git repository

Properties

GH_REPO

String (Environment Variable)

Default: Second half of `REPO_SLUG`

GH_TOKEN

String (Environment Variable)

Default: None - throws when not set

GH_USER

String (Environment Variable)

Default: First half of `REPO_SLUG`

REPO_SLUG

String (Environment Variable)

Default: None - throws when not set