Methods

(async, inner) cleanup() → {Promise.<void>}

Cleanup all pages from confluence

Returns:
Type: 
Promise.<void>

(inner) cleanupSummary(siteName)

Write action summary after cleanup

Parameters:
NameTypeDescription
siteNamestring

The site name

(inner) errorHandler(error)

Handles errors and fails the action

Parameters:
NameTypeDescription
errorError

The Error that occurred

(async, inner) findParentPage() → {number}

Find the id of the Confluence page Configured to be the parent for our documents

Throws:

Error if the configured parent page does not exist

Returns:

The id of the configured parent page

Type: 
number

(async, inner) sync() → {Promise.<void>}

Sync local markdown documentation with Confluence

Returns:
Type: 
Promise.<void>

(async, inner) syncHome(repo, siteName, localPage, renderer) → {Promise.<number>}

Create or update home page from README.md

Parameters:
NameTypeDescription
repostring
siteNamestring
localPageLocalPage
rendererAssetRenderer
Returns:

Home page id

Type: 
Promise.<number>

(async, inner) syncPages(home, localPages, renderer)

Sync Local pages with Confluence

Parameters:
NameTypeDescription
homenumber

The id of the home page

localPagesArray.<LocalPage>

Array of pages

rendererAssetRenderer

AssetRenderer instance

(inner) syncSummary(siteName, url)

Write action summary

Parameters:
NameTypeDescription
siteNamestring

The name of the documentation site

urlstring

The Confluence url of the published documentation

(async, inner) union(parentPageId, localPages) → {Array.<(LocalPage|RemotePage)>}

Creates a union of remote and local pages that need to be synced with Confluence

Parameters:
NameTypeDescription
parentPageIdnumber

The parent page to all pages

localPagesArray.<LocalPage>
Returns:

An array of pages to be synced

Type: 
Array.<(LocalPage|RemotePage)>

(async, inner) unpublish(remotePages)

Parameters:
NameTypeDescription
remotePagesIterable.<RemotePage>