Skip to content

Commit

Permalink
chore: add ci config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Oct 10, 2023
1 parent be48b4b commit 6c69783
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI
on:
push:
branches:
- main

jobs:
build:
runs-on: macos-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.0.app/Contents/Developer
steps:
- uses: actions/checkout@v3
- name: Build DocC
run: |
swift package \
--allow-writing-to-directory ./docs \
generate-documentation --target SearchField \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path SearchField \
--output-path ./docs
- name: Deploy Document
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
3 changes: 3 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ let package = Package(
name: "SearchField",
targets: ["SearchField"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>SearchFieldExample.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>2</integer>
</dict>
</dict>
</dict>
Expand Down

0 comments on commit 6c69783

Please sign in to comment.