-
Notifications
You must be signed in to change notification settings - Fork 1.2k
39 lines (34 loc) · 1.31 KB
/
deploy_docs.yml
File metadata and controls
39 lines (34 loc) · 1.31 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
name: Deploy DocC
on:
push:
branches:
- "main"
permissions:
contents: write
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build_docs:
runs-on: macos-15
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Build DocC
run: |
swift package resolve;
xcodebuild docbuild -scheme MessageKit -derivedDataPath /tmp/docbuild -destination 'generic/platform=iOS';
$(xcrun --find docc) process-archive \
transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/MessageKit.doccarchive \
--hosting-base-path MessageKit \
--output-path docs
$(xcrun --find docc) process-archive \
transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/InputBarAccessoryView.doccarchive \
--hosting-base-path MessageKit/InputBarAccessoryView \
--output-path docs/InputBarAccessoryView
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs