Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
book

GitHub Action

Swift Package Documentation Generator

v2.0

Swift Package Documentation Generator

book

Swift Package Documentation Generator

Generates documentation for a Swift package using docc

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Swift Package Documentation Generator

uses: sersoft-gmbh/swifty-docs-action@v2.0

Learn more about this action in sersoft-gmbh/swifty-docs-action

Choose a version

Swift Package Documentation Generator

Tests

This action generates documentation for a Swift package using docc.

Important: The package must use the Swift-DocC Plugin unless xcodebuild is used!

Note: Version 2 of this action replaced jazzy with docc! Use @v1 to use jazzy.

Inputs

package-path

The path to the package.
Required. Defaults to ${{github.workspace}}.

package-version

The version to use for this package.

enable-inherited-docs

Whether to enable inherited docs. Defaults to false.

enable-index-buildiung

Enable index building. Defaults to false.

transform-for-static-hosting

Enables the static hosting transformation. Defaults to false.

hosting-base-path

The hosting base path to use.

other-docc-arguments

Further (newline-separated) docc arguments.

targets

A list of targets separated by newline. If not given, all targets are built.
This is ignored if use-xcodebuild is true!

use-xcodebuild

Tells the action to use xcodebuild (instead of swift package). Use xcodebuild-scheme and xcodebuild-destination to further customize the xcodebuild invocation.
Defaults to false.
Note: This parameter is only evaluated when running on macOS.

xcodebuild-scheme

The scheme to use for the xcodebuild invocation. Only used if use-xcodebuild is true.
Note: This parameter is only evaluated when running on macOS.

xcodebuild-destination

The destination to use for the xcodebuild invocation. Only used if use-xcodebuild is true.
Note: This parameter is only evaluated when running on macOS.

other-xcodebuild-arguments

Further (newline-separated) xcodebuild arguments.

output

The path to the output directory.

Example Usage

Use the following snippet in a Swift package repository to generate documentation for all products of your Swift package:

uses: sersoft-gmbh/swifty-docs-action@v2
with:
  output: docs