Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

Commit 51a55bc

Browse files
committed
chore: build and deploy docc documentation
1 parent 9c4c0c5 commit 51a55bc

4 files changed

Lines changed: 58 additions & 6 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
push:
3+
branches:
4+
- docs/build-docc
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
deployments: write
12+
name: Publish to Cloudflare Pages
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- uses: jdx/mise-action@v2
17+
with:
18+
experimental: true
19+
- name: Build docs
20+
run: mise run docs:build
21+
- name: Deploy
22+
uses: cloudflare/wrangler-action@v3
23+
with:
24+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
25+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
26+
command: pages deploy .build/documentation --project-name=xcodegraph
27+
# Optional: Enable this if you want to have GitHub Deployments triggered
28+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

.mise/tasks/docs/build

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# mise description="Build docs"
3+
set -euo pipefail
4+
5+
swift package --package-path $MISE_PROJECT_ROOT --allow-writing-to-directory .build/documentation generate-documentation --disable-indexing --output-path .build/documentation --transform-for-static-hosting --target XcodeGraph

Package.resolved

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let targets: [Target] = [
99
"Path",
1010
],
1111
swiftSettings: [
12-
.enableExperimentalFeature("StrictConcurrency"),
12+
.enableExperimentalFeature("StrictConcurrency")
1313
]
1414
),
1515
.target(
@@ -29,7 +29,7 @@ let targets: [Target] = [
2929
name: "XcodeMetadataTests",
3030
dependencies: ["XcodeMetadata", "XcodeGraph"],
3131
swiftSettings: [
32-
.enableExperimentalFeature("StrictConcurrency"),
32+
.enableExperimentalFeature("StrictConcurrency")
3333
]
3434
),
3535
.target(
@@ -42,14 +42,14 @@ let targets: [Target] = [
4242
.product(name: "XcodeProj", package: "XcodeProj"),
4343
],
4444
swiftSettings: [
45-
.enableExperimentalFeature("StrictConcurrency"),
45+
.enableExperimentalFeature("StrictConcurrency")
4646
]
4747
),
4848
.testTarget(
4949
name: "XcodeGraphTests",
5050
dependencies: [.target(name: "XcodeGraph")],
5151
swiftSettings: [
52-
.enableExperimentalFeature("StrictConcurrency"),
52+
.enableExperimentalFeature("StrictConcurrency")
5353
]
5454
),
5555
.testTarget(
@@ -59,7 +59,7 @@ let targets: [Target] = [
5959
.product(name: "FileSystem", package: "FileSystem"),
6060
],
6161
swiftSettings: [
62-
.enableExperimentalFeature("StrictConcurrency"),
62+
.enableExperimentalFeature("StrictConcurrency")
6363
]
6464
),
6565
]
@@ -83,6 +83,7 @@ let package = Package(
8383
.package(url: "https://github.com/apple/swift-service-context", .upToNextMajor(from: "1.0.0")),
8484
.package(url: "https://github.com/Kolos65/Mockable.git", .upToNextMajor(from: "0.0.11")),
8585
.package(url: "https://github.com/p-x9/MachOKit", .upToNextMajor(from: "0.28.0")),
86+
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.0.0"),
8687
],
8788
targets: targets
8889
)

0 commit comments

Comments
 (0)