-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.4 KB
/
docs.yml
File metadata and controls
50 lines (46 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Deploy DocC Documentation
on:
push:
branches: [main]
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
docs:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Setup Swift
uses: swift-actions/setup-swift@v3
with:
swift-version: "6.3.0"
- name: Resolve dependencies
run: swift package resolve
- name: Patch swift-configuration for Swift 6 Foundation
run: |
sed -i '' 's/fileContents!\.bytes/fileContents!.withUnsafeBytes { RawSpan(_unsafeBytes: $0) }/g' \
.build/checkouts/swift-configuration/Sources/Configuration/Providers/Files/FileProvider.swift
- name: Build DocC
run: |
swift build \
-Xswiftc -emit-symbol-graph \
-Xswiftc -emit-symbol-graph-dir \
-Xswiftc .build/symbol-graphs
xcrun docc convert Sources/SecurityKit/SecurityKit.docc \
--additional-symbol-graph-dir .build/symbol-graphs \
--output-path docs \
--transform-for-static-hosting \
--hosting-base-path Security
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs
- name: Deploy to Pages
uses: actions/deploy-pages@v4