Skip to content

Commit

Permalink
Build a documentation using Docc (#11)
Browse files Browse the repository at this point in the history
* Update Flare's documentation

* Implement an action for building a documentation web page

* Update `CHANGELOG.md`

* Update `publish-pages.yml`

* Update `README.md`
  • Loading branch information
ns-vasilev authored Jan 5, 2024
1 parent d64f9b9 commit 1dbdccd
Show file tree
Hide file tree
Showing 18 changed files with 290 additions and 194 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy DocC

on:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-12
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Build DocC
run: |
swift build;
swift package \
--allow-writing-to-directory ./docs \
generate-documentation \
--target Flare \
--output-path ./docs \
--transform-for-static-hosting \
--hosting-base-path flare;
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
## [Unreleased]

## Added
- Build a documentation using `Docc`
- Added in Pull Request [#11](https://github.com/space-code/flare/pull/11).

- Integrate the `StoreKit2` purchase method
- Added in Pull Request [#10](https://github.com/space-code/flare/pull/10).

Expand Down
Binary file removed Documentation/Resources/flare.png
Binary file not shown.
186 changes: 0 additions & 186 deletions Documentation/Usage.md

This file was deleted.

18 changes: 18 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@
"revision" : "f9611694f77f64e43d9467a16b2f5212cd04099b",
"version" : "0.0.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
Expand Down
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/space-code/concurrency.git", .upToNextMajor(from: "0.0.1")),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.1.0"),
],
targets: [
.target(
Expand Down
1 change: 1 addition & 0 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/space-code/concurrency.git", .upToNextMajor(from: "0.0.1")),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.1.0"),
],
targets: [
.target(
Expand Down
1 change: 1 addition & 0 deletions [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/space-code/concurrency.git", .upToNextMajor(from: "0.0.1")),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.1.0"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Flare is a framework written in Swift that makes it easy for you to work with in
- [x] Complete Unit Test Coverage

## Documentation
Check out [flare documentation](https://github.com/space-code/flare/blob/main/Documentation/Usage.md).
Check out [flare documentation](https://space-code.github.io/flare/documentation/flare/).

## Requirements
- iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 7.0+ / visionOS 1.0+
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import StoreKit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation
Expand Down
3 changes: 2 additions & 1 deletion Sources/Flare/Classes/Models/ProductCategory.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation

/// Enumeration representing different categories of products in an app.
public enum ProductCategory: Int {
/// A non-renewable or auto-renewable subscription.
case subscription
Expand Down
4 changes: 2 additions & 2 deletions Sources/Flare/Classes/Models/SubscriptionPeriod.swift
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation
import StoreKit

// MARK: - SubscriptionPeriod

// A class representing a subscription period with a specific value and unit.
/// A class representing a subscription period with a specific value and unit.
public final class SubscriptionPeriod: NSObject {
// MARK: Types

Expand Down
6 changes: 4 additions & 2 deletions Sources/Flare/Classes/Models/VerificationError.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation

public enum VerificationError: Swift.Error {
/// Enumeration representing errors that can occur during verification.
public enum VerificationError: Error {
// Case for unverified product with associated productID and error details.
case unverified(productID: String, error: Error)
}
Loading

0 comments on commit 1dbdccd

Please sign in to comment.