Reusable GitHub Actions workflows for publishing Swift package documentation to Swiftipedia.
Add this workflow to your Swift package repository at .github/workflows/docs.yml:
name: Deploy to Swiftipedia
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
deploy:
uses: unionst/swiftipedia-workflows/.github/workflows/build-package-docs.yml@main
with:
package-name: my-package # lowercase, URL-friendly name
scheme: MyPackage # Xcode scheme name
secrets: inheritThat's it! Tag a release and your docs will be live at https://swiftipedia.org/documentation/my-package/.
| Input | Required | Default | Description |
|---|---|---|---|
package-name |
Yes | - | Lowercase package name for URLs (e.g., unionchat) |
scheme |
Yes | - | Xcode scheme name to build (e.g., union-chat) |
xcode-version |
No | 26.1 |
Xcode version to use |
platform |
No | iOS Simulator |
Build platform destination |
The following secrets must be available (set at org level or per-repo):
| Secret | Description |
|---|---|
SWIFTIPEDIA_DEPLOY_TOKEN |
GitHub token with write access to unionst/swiftipedia-frontend |
Use standard DocC comments in your Swift files:
/// A brief description of your type.
///
/// A more detailed discussion of your type, including
/// usage examples and important notes.
///
/// ## Topics
///
/// ### Creating Instances
/// - ``init()``
///
/// ## Example
///
/// ```swift
/// let example = MyType()
/// example.doSomething()
/// ```
@available(iOS 15.0, *)
public struct MyType {
// ...
}Create and push a version tag:
git tag v1.0.0
git push origin v1.0.0Or manually trigger via GitHub Actions UI (workflow_dispatch).