From cb9281ca8de2da272a59264bb7782cec87084486 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Nov 2025 11:23:53 +0000 Subject: [PATCH 1/3] Initial plan From 74b0e7695ef2663e17ea37b35ae3c461b1e5514c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Nov 2025 11:29:35 +0000 Subject: [PATCH 2/3] Add swift-docc-plugin dependency and GitHub Pages workflow Co-authored-by: mikelrob <3390342+mikelrob@users.noreply.github.com> --- .github/workflows/deploy-docs.yml | 46 +++++++++++++++++++++++++++++++ Package.resolved | 23 ++++++++++++++++ Package.swift | 6 ++-- 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy-docs.yml create mode 100644 Package.resolved diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..74b5540 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,46 @@ +name: Deploy Documentation + +on: + push: + branches: [ master ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + + - name: Build DocC + run: | + swift package --allow-writing-to-directory ./docs \ + generate-documentation --target TimeIt \ + --disable-indexing \ + --transform-for-static-hosting \ + --hosting-base-path TimeIt \ + --output-path ./docs + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./docs + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..eec9740 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,23 @@ +{ + "pins" : [ + { + "identity" : "swift-docc-plugin", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-docc-plugin", + "state" : { + "revision" : "3e4f133a77e644a5812911a0513aeb7288b07d06", + "version" : "1.4.5" + } + }, + { + "identity" : "swift-docc-symbolkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/swiftlang/swift-docc-symbolkit", + "state" : { + "revision" : "b45d1f2ed151d057b54504d653e0da5552844e34", + "version" : "1.0.0" + } + } + ], + "version" : 2 +} diff --git a/Package.swift b/Package.swift index 82295dd..3860519 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.6 import PackageDescription let package = Package( @@ -8,7 +8,9 @@ let package = Package( name: "TimeIt", targets: ["TimeIt"]), ], - dependencies: [], + dependencies: [ + .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), + ], targets: [ .target( name: "TimeIt", From 278919c303023bd617f1ea508f697f3afe387cca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 20 Nov 2025 11:30:53 +0000 Subject: [PATCH 3/3] Update README with GitHub Pages documentation link Co-authored-by: mikelrob <3390342+mikelrob@users.noreply.github.com> --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 41d5257..fa75b6d 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ TimeIt.complete(log: "myOperation") { logs in ## Documentation -Full API documentation is available as DocC documentation. To generate and view the documentation: +Full API documentation is available online at [https://mikelrob.github.io/TimeIt/documentation/timeit/](https://mikelrob.github.io/TimeIt/documentation/timeit/). + +You can also generate and view the documentation locally: ```bash swift package generate-documentation