Skip to content

Publish WikiContent

dscbot edited this page May 29, 2024 · 2 revisions

Publish-WikiContent

SYNOPSIS

Publishes the Wiki Content that is generated by New-DscResourceWikiPage.

SYNTAX

Publish-WikiContent [-Path] <String> [-OwnerName] <String> [-RepositoryName] <String> [-ModuleName] <String>
 [-ModuleVersion] <String> [-GitHubAccessToken] <String> [-GitUserEmail] <String> [-GitUserName] <String>
 [[-GlobalCoreAutoCrLf] <String>] [<CommonParameters>]

DESCRIPTION

Publishes the Wiki content that was generated by the cmdlet New-DscResourceWikiPage.

If there is an existing _Sidebar.md present in the WikiOutput folder then it will be published. If there is no existing _Sidebar.md in the WikiOutput folder a _Sidebar.md file will be dynamically generated based on the files in the WikiOutput folder.

NOTE: There must already be a Wiki created in the GitHub repository before using this cmdlet, otherwise it will fail since there is no Wiki repository.

EXAMPLES

EXAMPLE 1

Publish-WikiContent `
    -Path '.\output\WikiContent' `
    -OwnerName 'dsccommunity' `
    -RepositoryName 'SqlServerDsc' `
    -ModuleName 'SqlServerDsc' `
    -ModuleVersion '14.0.0' `
    -GitHubAccessToken 'token' `
    -GitUserEmail '[email protected]' `
    -GitUserName 'dsc'

Adds the content pages in '.\output\WikiContent' to the Wiki for the specified GitHub repository.

EXAMPLE 2

Publish-WikiContent `
    -Path '.\output\WikiContent' `
    -OwnerName 'dsccommunity' `
    -RepositoryName 'SqlServerDsc' `
    -ModuleName 'SqlServerDsc' `
    -ModuleVersion '14.0.0' `
    -GitHubAccessToken 'token' `
    -GitUserEmail '[email protected]' `
    -GitUserName 'dsc' `
    -GlobalCoreAutoCrLf 'true'

Adds the content pages in '.\output\WikiContent' to the Wiki for the specified GitHub repository. The wiki repository will be cloned after the git configuration setting --global core.autocrlf have been set to true making sure the current wiki files are checkout using CRLF.

PARAMETERS

-GitHubAccessToken

The GitHub access token to allow a push to the GitHub Wiki.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GitUserEmail

The email address to use for the Git commit.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GitUserName

The user name to use for the Git commit.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GlobalCoreAutoCrLf

Specifies how line breaks should be handled when cloning the GitHub wiki repository. Valid values are 'true', 'false', or 'input'.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ModuleName

The name of the Dsc Resource Module.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ModuleVersion

The build version number to tag the Wiki Github commit with.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OwnerName

The owner name of the Github repository.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path

The path to the output that was generated by New-DscResourceWikiPage.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RepositoryName

The name of the Github repository.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS