Skip to content

Commit 738cf03

Browse files
committed
ci(publish): add GitHub Actions workflow for documentation
1 parent f5269c4 commit 738cf03

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [released, prereleased]
6+
7+
jobs:
8+
docc:
9+
name: Generate and publish documentation
10+
runs-on: macOS-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-java@v4
14+
with:
15+
distribution: 'zulu'
16+
java-version: 21
17+
- uses: gradle/actions/setup-gradle@v5
18+
- name: Generate documentation
19+
- uses: fwcd/swift-docc-action@v1
20+
with:
21+
target: URLSessionExtension
22+
output: ./docs
23+
hosting-base-path: storyblok-swift
24+
transform-for-static-hosting: 'true'
25+
- name: Deploy API documentation to Github Pages
26+
uses: JamesIves/github-pages-deploy-action@v4
27+
with:
28+
branch: gh-pages
29+
folder: docs
30+
target-folder: docs

Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ let package = Package(
2121
dependencies: [
2222
.package(url: "https://github.com/apple/swift-log", from: "1.6.0"),
2323
.package(url: "https://github.com/WeTransfer/Mocker.git", .upToNextMajor(from: "3.0.0"))
24+
.package(url: "https://github.com/apple/swift-docc-plugin.git", from: "1.0.0"),
2425
],
2526
targets: [
2627
.target(

0 commit comments

Comments
 (0)