Skip to content

Commit

Permalink
Merge pull request #23 from playbook-ui/docc
Browse files Browse the repository at this point in the history
Generate docs using DocC
  • Loading branch information
ra1028 authored Feb 1, 2024
2 parents 6ee953b + c524240 commit ecdfa87
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 219 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# https://github.com/actions/virtual-environments

name: docs

on:
release:
types: [published]
workflow_dispatch:

env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app

jobs:
publish-docs:
name: Publish Documentation
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Build docs
run: make docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ node_modules

## Visual regression test
Snapshots

## Documentation
docs
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ lint:
npm:
npm i

.PHONY: docs
docs:
xcodebuild docbuild \
-scheme PlaybookAccessibilitySnapshot \
-destination generic/platform=iOS \
OTHER_DOCC_FLAGS="--transform-for-static-hosting --hosting-base-path accessibility-snapshot-ios --output-path docs"

.PHONY: fix-readme-links
fix-readme-links:
sed -i '' -E '/.?http/!s#(<img src=")([^"]+)#\1$(GITHUB_RAW_CONTENT_PATH)\2#g' README.md
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

## Usage

- [API Document](https://playbook-ui.github.io/accessibility-snapshot-ios)
- [API Document](https://playbook-ui.github.io/accessibility-snapshot-ios/documentation/playbookaccessibilitysnapshot)
- [Example App](https://github.com/playbook-ui/accessibility-snapshot-ios/tree/main/Example)

---
Expand Down
1 change: 0 additions & 1 deletion docs/all.css

This file was deleted.

217 changes: 0 additions & 217 deletions docs/index.html

This file was deleted.

0 comments on commit ecdfa87

Please sign in to comment.