Skip to content

Commit ccd5af8

Browse files
committed
deploy DocC docs to gh-pages root on pushing to master.
1 parent 14dd6aa commit ccd5af8

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/deploy_docs.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deploy DocC
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
permissions:
8+
contents: write
9+
jobs:
10+
build_docs:
11+
runs-on: macos-12
12+
steps:
13+
- name: Checkout 🛎️
14+
uses: actions/checkout@v3
15+
16+
- name: Build DocC
17+
run: |
18+
swift package resolve
19+
xcodebuild docbuild -scheme MessageKit -derivedDataPath 'docc' -destination 'generic/platform=iOS';
20+
$(xcrun --find docc) process-archive \
21+
transform-for-static-hosting docc/Build/Products/Debug-iphoneos/MessageKit.doccarchive \
22+
--hosting-base-path '' \
23+
--output-path docs
24+
$(xcrun --find docc) process-archive \
25+
transform-for-static-hosting docc/Build/Products/Debug-iphoneos/InputBarAccessoryView.doccarchive \
26+
--hosting-base-path InputBarAccessoryView \
27+
--output-path docs/InputBarAccessoryView
28+
- name: Deploy to GitHub Pages
29+
uses: peaceiris/actions-gh-pages@v3
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: ./docs

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
build/
88
DerivedData
99
.build/
10+
docs/
11+
docc/
1012

1113
## Various settings
1214
*.pbxuser

0 commit comments

Comments
 (0)