-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1127636
commit 05ff379
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Document | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
document: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Wait for build to succeed | ||
uses: fountainhead/[email protected] | ||
id: wait-for-build | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
checkName: Build iOS | ||
ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
|
||
- name: Wait for test to succeed | ||
if: steps.wait-for-build.outputs.conclusion == 'success' | ||
uses: fountainhead/[email protected] | ||
id: wait-for-test | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
checkName: Test iOS | ||
ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
|
||
- name: Install Sourcekitten | ||
if: steps.wait-for-test.outputs.conclusion == 'success' | ||
run: brew install sourcekitten | ||
|
||
- name: Install Jazzy | ||
run: gem install jazzy | ||
|
||
- name: Build Swift docs | ||
run: | | ||
sourcekitten doc --spm --module-name ${{ github.event.repository.name }} > swiftDoc.json | ||
- name: Build ObjC docs | ||
run: | | ||
sourcekitten doc --objc $(pwd)/Sources/${{ github.event.repository.name }}ObjC/include/${{ github.event.repository.name }}ObjC.h \ | ||
-- -x objective-c -isysroot $(xcrun --show-sdk-path --sdk iphonesimulator) \ | ||
-I $(pwd) -fmodules > objcDoc.json | ||
- name: Get Jazzy | ||
run: | | ||
jazzy --sourcekitten-sourcefile objcDoc.json,swiftDoc.json | ||
- name: Publish | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: gh-pages | ||
folder: docs |