Skip to content

Commit

Permalink
Add auto-document workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
terwanerik committed Apr 1, 2022
1 parent f3c9bc9 commit 56abedc
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/document.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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: Install Doc Generator
run: |
git clone https://github.com/mediamonks/MMMDocGenerator.git
cd MMMDocGenerator
swift build -c release
cd ../
cp MMMDocGenerator/.build/release/DocGenerator .
- name: Generate docs
run: ./DocGenerator -p ${{ github.event.repository.name }}

- name: Publish
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs

0 comments on commit 56abedc

Please sign in to comment.