-
-
Notifications
You must be signed in to change notification settings - Fork 21
41 lines (41 loc) · 1.18 KB
/
BuildDocs.yml
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
name: Build Documentation
on:
push:
branches: ["main", "improvement/github-actions-docc"]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- uses: SwiftyLab/setup-swift@latest
with:
development: true
swift-version: latest
check-latest: true
- name: Build DocC
run: |
xcodebuild docbuild -scheme PlaydateKit \
-derivedDataPath /tmp/docc \
-destination 'platform=macOS' \
-toolchain 'swift latest';
$(xcrun -f docc -toolchain 'swift latest') process-archive \
transform-for-static-hosting $(find /tmp/docc -type d -name '*.doccarchive') \
--hosting-base-path PlaydateKit \
--output-path docs;
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1