Skip to content

Commit ecdfa87

Browse files
authored
Merge pull request #23 from playbook-ui/docc
Generate docs using DocC
2 parents 6ee953b + c524240 commit ecdfa87

File tree

6 files changed

+36
-219
lines changed

6 files changed

+36
-219
lines changed

.github/workflows/docs.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# https://github.com/actions/virtual-environments
2+
3+
name: docs
4+
5+
on:
6+
release:
7+
types: [published]
8+
workflow_dispatch:
9+
10+
env:
11+
DEVELOPER_DIR: /Applications/Xcode_15.2.app
12+
13+
jobs:
14+
publish-docs:
15+
name: Publish Documentation
16+
runs-on: macos-13
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Build docs
20+
run: make docs
21+
- name: Deploy
22+
uses: peaceiris/actions-gh-pages@v3
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
publish_dir: docs

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ node_modules
3030

3131
## Visual regression test
3232
Snapshots
33+
34+
## Documentation
35+
docs

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ lint:
1818
npm:
1919
npm i
2020

21+
.PHONY: docs
22+
docs:
23+
xcodebuild docbuild \
24+
-scheme PlaybookAccessibilitySnapshot \
25+
-destination generic/platform=iOS \
26+
OTHER_DOCC_FLAGS="--transform-for-static-hosting --hosting-base-path accessibility-snapshot-ios --output-path docs"
27+
2128
.PHONY: fix-readme-links
2229
fix-readme-links:
2330
sed -i '' -E '/.?http/!s#(<img src=")([^"]+)#\1$(GITHUB_RAW_CONTENT_PATH)\2#g' README.md

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
## Usage
1919

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

2323
---

docs/all.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/index.html

Lines changed: 0 additions & 217 deletions
This file was deleted.

0 commit comments

Comments
 (0)