Skip to content
This repository has been archived by the owner on May 8, 2023. It is now read-only.

GeorgDangl/Nuke.WebDocu

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Archival Information: This repository is archived, it was moved as a sub project into https://github.com/GeorgDangl/Nuke.GitHub

Nuke.WebDocu

Build Status

NuGet MyGet

This plugin provides a task to upload documentation packages to WebDocu sites. It's written for the NUKE Build system.

Link to documentation.

Changelog

CI Builds

All builds are available on MyGet:

https://www.myget.org/F/dangl/api/v2
https://www.myget.org/F/dangl/api/v3/index.json

Example

When publishing to WebDocu, you have to include the version of the docs.

Getting the Version from Generated NuGet Packages

Target UploadDocumentation => _ => _
    .DependsOn(BuildDocumentation)
    .Requires(() => DocuApiKey)
    .Requires(() => DocuBaseUrl)
    .Executes(() =>
    {
        WebDocuTasks.WebDocu(s =>
        {
            var packageVersion = GlobFiles(OutputDirectory, "*.nupkg").NotEmpty()
                .Where(x => !x.EndsWith("symbols.nupkg"))
                .Select(Path.GetFileName)
                .Select(x => WebDocuTasks.GetVersionFromNuGetPackageFilename(x, "Nuke.WebDeploy"))
                .First();

            return s.SetDocuBaseUrl(DocuBaseUrl)
                    .SetDocuApiKey(DocuApiKey)
                    .SetSourceDirectory(OutputDirectory / "docs")
                    .SetVersion(packageVersion);
        });
    });

Getting the Version from GitVersion

Target UploadDocumentation => _ => _
    .DependsOn(Push) // To have a relation between pushed package version and published docs version
    .DependsOn(BuildDocumentation)
    .Requires(() => DocuApiKey)
    .Requires(() => DocuApiEndpoint)
    .Executes(() =>
    {
        WebDocuTasks.WebDocu(s => s.SetDocuApiEndpoint(DocuApiEndpoint)
            .SetDocuApiKey(DocuApiKey)
            .SetSourceDirectory(OutputDirectory / "docs")
            .SetVersion(GitVersion.NuGetVersion));
    });

The DocuApiEndpoint should look like this:

https://docs.dangl-it.com/API/Projects/Upload

License

This project is available under the MIT license.