diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..39457f1 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,37 @@ +name: Deploy Docs + +on: + push: + branches: + - main + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + deploy: + runs-on: macos-13 + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - uses: actions/checkout@v3 + - uses: actions/configure-pages@v3 + + - name: Build docs + run: swift package --allow-writing-to-directory ./docs generate-documentation --target OllamaKit --disable-indexing --output-path ./docs --transform-for-static-hosting + + - uses: actions/upload-pages-artifact@v2 + with: + path: "docs" + + - uses: actions/deploy-pages@v2 + id: deployment diff --git a/.gitignore b/.gitignore index 0023a53..6832c87 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +/docs /.build /Packages xcuserdata/ diff --git a/Package.resolved b/Package.resolved index bc7ce25..b5b6729 100644 --- a/Package.resolved +++ b/Package.resolved @@ -8,6 +8,24 @@ "revision" : "3dc6a42c7727c49bf26508e29b0a0b35f9c7e1ad", "version" : "5.8.1" } + }, + { + "identity" : "swift-docc-plugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-docc-plugin", + "state" : { + "revision" : "26ac5758409154cc448d7ab82389c520fa8a8247", + "version" : "1.3.0" + } + }, + { + "identity" : "swift-docc-symbolkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-docc-symbolkit", + "state" : { + "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", + "version" : "1.0.0" + } } ], "version" : 2 diff --git a/Package.swift b/Package.swift index 6fc61f5..85d91b0 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,8 @@ let package = Package( targets: ["OllamaKit"]), ], dependencies: [ - .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.8.1")) + .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.8.1")), + .package(url: "https://github.com/apple/swift-docc-plugin.git", .upToNextMajor(from: "1.3.0")) ], targets: [ .target( diff --git a/README.md b/README.md index 673b1bb..e6d6789 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ # OllamaKit -A Swift library for interacting with the Ollama API. +A Swift library for interacting with the [Ollama](https://github.com/jmorganca/ollama) API. ## Overview -`OllamaKit` is a Swift library for interacting with the Ollama API, built on top of the powerful [Alamofire](https://github.com/Alamofire/Alamofire) networking framework. It extends Alamofire's capabilities to provide a streamlined and intuitive interface for managing network interactions and data processing specific to the [Ollama API](https://github.com/jmorganca/ollama/blob/main/docs/api.md). +`OllamaKit` simplifies the process of connecting Swift applications to the Ollama API, abstracting the complexities of network requests and data handling. ## Primary Use -`OllamaKit` is primarily designed for use within [Ollamac](https://github.com/kevinhermawan/Ollamac), a macOS application dedicated to interacting with Ollama models. While the library offers comprehensive functionalities for Ollama API interaction, its features and optimizations are specifically aligned with the requirements of `Ollamac`. This focus ensures that `OllamaKit` provides an ideal toolset for `Ollamac`, facilitating efficient and effective model management and interaction. +`OllamaKit` is primarily designed for use within [Ollamac](https://github.com/kevinhermawan/Ollamac), a macOS app for interacting with the Ollama models. While the library offers comprehensive functionalities for Ollama API interaction, its features and optimizations are specifically aligned with the requirements of `Ollamac`. -## Requirements +## Documentation -- iOS 13.0+ / macOS 11+ +You can find the documentation here: [https://kevinhermawan.github.io/ollamakit/documentation/ollamakit](https://kevinhermawan.github.io/ollamakit/documentation/ollamakit) ## Installation