From 317fc8aa3737024ca30eb91f8115e7af73ce9fe8 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 16:22:59 +0200 Subject: [PATCH 01/18] test docs --- .github/workflows/docs.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/docs.yaml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..0bdf24f --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,20 @@ +name: Deploy Docs + +on: + push: + branches: + - main + - api-ref + +jobs: + build: + name: Build and test + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Build Docs + run: | + xcodebuild docbuild -scheme PowerSync -destination 'platform=macOS' -derivedDataPath ./DerivedData + xcrun docc process-archive transform-for-static-hosting \ + ./DerivedData/Build/Products/Debug/PowerSync.doccarchive \ + --output-path ./docs From 4126145605a28a5966f01211a0460bc197008097 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 16:24:56 +0200 Subject: [PATCH 02/18] test --- .github/workflows/docs.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 0bdf24f..9fcd73e 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -2,9 +2,6 @@ name: Deploy Docs on: push: - branches: - - main - - api-ref jobs: build: From 6c0a917b868b33d67ed7ca03c0ba5db2b4f642d6 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 16:29:42 +0200 Subject: [PATCH 03/18] test --- .github/workflows/docs.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 9fcd73e..c1e6ea4 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -12,6 +12,14 @@ jobs: - name: Build Docs run: | xcodebuild docbuild -scheme PowerSync -destination 'platform=macOS' -derivedDataPath ./DerivedData + + - name: Debug + run: | + ls -la ./DerivedData/Build/Products/Debug + ls -la ./DerivedData/Build/Products/Debug/PowerSync.doccarchive + + - name: Process Docs + run: | xcrun docc process-archive transform-for-static-hosting \ - ./DerivedData/Build/Products/Debug/PowerSync.doccarchive \ - --output-path ./docs + ./DerivedData/Build/Products/Debug/PowerSync.doccarchive \ + --output-path ./docs From 569d970601c88dfc3dcf69a9d592a20bc99c1f52 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 16:32:01 +0200 Subject: [PATCH 04/18] test --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index c1e6ea4..2ad97f1 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -21,5 +21,5 @@ jobs: - name: Process Docs run: | xcrun docc process-archive transform-for-static-hosting \ - ./DerivedData/Build/Products/Debug/PowerSync.doccarchive \ + ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ \ --output-path ./docs From dfa3b904ae85e5edbfbd199312478c968c1ff27f Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 16:33:46 +0200 Subject: [PATCH 05/18] test --- .github/workflows/docs.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 2ad97f1..68dd756 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -20,6 +20,4 @@ jobs: - name: Process Docs run: | - xcrun docc process-archive transform-for-static-hosting \ - ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ \ - --output-path ./docs + xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ --output-path ./docs From 0004dedaf47d1e39ef1ec50d1b5bd0ba322af711 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 16:35:37 +0200 Subject: [PATCH 06/18] test --- .github/workflows/docs.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 68dd756..9c4a03e 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -21,3 +21,7 @@ jobs: - name: Process Docs run: | xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ --output-path ./docs + + - name: Debug + run: | + ls -la ./docs From ab73a7b7a3a9f57dd132126f9172e337cbff8e02 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 16:38:37 +0200 Subject: [PATCH 07/18] pages deploy --- .github/workflows/docs.yaml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 9c4a03e..f45bb56 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -3,6 +3,11 @@ name: Deploy Docs on: push: +permissions: + contents: read + pages: write + id-token: write + jobs: build: name: Build and test @@ -22,6 +27,20 @@ jobs: run: | xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ --output-path ./docs - - name: Debug - run: | - ls -la ./docs + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v3 + with: + path: docs/documentation/PowerSync + + # Deployment job + 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 From 8a12ef83bab9135d8a0b8d2a40fb3d4dca2e7a7b Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 16:44:27 +0200 Subject: [PATCH 08/18] hosting repo --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index f45bb56..6e753b0 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -25,7 +25,7 @@ jobs: - name: Process Docs run: | - xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ --output-path ./docs + xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ --output-path ./docs --hosting-base-path /powersync-swift - name: Upload static files as artifact id: deployment From 576341a54f460ed86043443fbabe8703c1ff5070 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 16:50:14 +0200 Subject: [PATCH 09/18] relative-path --- .github/workflows/docs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 6e753b0..a8a1dd6 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -25,13 +25,13 @@ jobs: - name: Process Docs run: | - xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ --output-path ./docs --hosting-base-path /powersync-swift + xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ --output-path ./docs-site --hosting-base-path /powersync-swift - name: Upload static files as artifact id: deployment uses: actions/upload-pages-artifact@v3 with: - path: docs/documentation/PowerSync + path: docs-site # Deployment job deploy: From f4d850a944abf38e2a3d998f3eca1d57d9976b9d Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 17:27:59 +0200 Subject: [PATCH 10/18] redirect --- .github/workflows/docs.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index a8a1dd6..5f87387 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -27,6 +27,10 @@ jobs: run: | xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ --output-path ./docs-site --hosting-base-path /powersync-swift + # The Docs are available at the path mentioned below. We can override the index.html to automatically redirect to the documentation page. + - name: Prepare static files + run: | + echo '' > .docs/index.html - name: Upload static files as artifact id: deployment uses: actions/upload-pages-artifact@v3 From 9863cf75441c525f388203084a0d7ab22b24caa3 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 17:28:10 +0200 Subject: [PATCH 11/18] cleanup --- .github/workflows/docs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 5f87387..73b8735 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -31,6 +31,7 @@ jobs: - name: Prepare static files run: | echo '' > .docs/index.html + - name: Upload static files as artifact id: deployment uses: actions/upload-pages-artifact@v3 From a61b1428ed051b2394b0296ec584736e4e875a68 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 17:28:40 +0200 Subject: [PATCH 12/18] fix bug --- .github/workflows/docs.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 73b8735..ee7aa75 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -18,11 +18,6 @@ jobs: run: | xcodebuild docbuild -scheme PowerSync -destination 'platform=macOS' -derivedDataPath ./DerivedData - - name: Debug - run: | - ls -la ./DerivedData/Build/Products/Debug - ls -la ./DerivedData/Build/Products/Debug/PowerSync.doccarchive - - name: Process Docs run: | xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ --output-path ./docs-site --hosting-base-path /powersync-swift @@ -30,7 +25,7 @@ jobs: # The Docs are available at the path mentioned below. We can override the index.html to automatically redirect to the documentation page. - name: Prepare static files run: | - echo '' > .docs/index.html + echo '' > .docs-site/index.html - name: Upload static files as artifact id: deployment From f57fd86af026bceb0b4686cce53c7c07ad15d2ca Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 17:30:11 +0200 Subject: [PATCH 13/18] typo --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index ee7aa75..47c1b45 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -25,7 +25,7 @@ jobs: # The Docs are available at the path mentioned below. We can override the index.html to automatically redirect to the documentation page. - name: Prepare static files run: | - echo '' > .docs-site/index.html + echo '' > ./docs-site/index.html - name: Upload static files as artifact id: deployment From 07d1b2ede602fc4fa262962cc1a3a474595311df Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Thu, 24 Apr 2025 17:42:41 +0200 Subject: [PATCH 14/18] cleanup --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 47c1b45..5f81413 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -10,7 +10,7 @@ permissions: jobs: build: - name: Build and test + name: Build runs-on: macos-latest steps: - uses: actions/checkout@v4 From 981e166468d962d91c85486b46c065dd1fca0001 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Wed, 30 Apr 2025 09:30:31 +0200 Subject: [PATCH 15/18] update to release build --- .github/workflows/docs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 5f81413..5506738 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -16,11 +16,11 @@ jobs: - uses: actions/checkout@v4 - name: Build Docs run: | - xcodebuild docbuild -scheme PowerSync -destination 'platform=macOS' -derivedDataPath ./DerivedData + xcodebuild docbuild -scheme PowerSync -destination 'platform=macOS' -derivedDataPath ./DerivedData -configuration Release - name: Process Docs run: | - xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ --output-path ./docs-site --hosting-base-path /powersync-swift + xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Release/PowerSync.doccarchive/ --output-path ./docs-site --hosting-base-path /powersync-swift # The Docs are available at the path mentioned below. We can override the index.html to automatically redirect to the documentation page. - name: Prepare static files From ecbf69511f66e967ce4875c117a3f50785064180 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Wed, 30 Apr 2025 09:34:29 +0200 Subject: [PATCH 16/18] cleanup --- .github/workflows/docs.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 5506738..23b65ac 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -16,11 +16,19 @@ jobs: - uses: actions/checkout@v4 - name: Build Docs run: | - xcodebuild docbuild -scheme PowerSync -destination 'platform=macOS' -derivedDataPath ./DerivedData -configuration Release + xcodebuild docbuild \ + -scheme PowerSync \ + -destination 'platform=macOS' \ + -derivedDataPath ./DerivedData \ + -configuration Release - name: Process Docs run: | - xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Release/PowerSync.doccarchive/ --output-path ./docs-site --hosting-base-path /powersync-swift + xcrun docc process-archive \ + transform-for-static-hosting \ + ./DerivedData/Build/Products/Release/PowerSync.doccarchive/ \ + --output-path ./docs-site \ + --hosting-base-path /powersync-swift # The Docs are available at the path mentioned below. We can override the index.html to automatically redirect to the documentation page. - name: Prepare static files From fa51438abb3f5ef05555527bdcbca915491ab82e Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Wed, 30 Apr 2025 09:43:03 +0200 Subject: [PATCH 17/18] test output --- .github/workflows/docs.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 23b65ac..80dafce 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -40,12 +40,14 @@ jobs: uses: actions/upload-pages-artifact@v3 with: path: docs-site + outputs: + page_url: ${{ steps.deployment.outputs.page_url }} # Deployment job deploy: environment: name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + url: ${{ needs.build.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: From 3c458ff13f15ab6b5eda85c87b5622f087c81dc7 Mon Sep 17 00:00:00 2001 From: stevensJourney Date: Wed, 30 Apr 2025 15:56:28 +0200 Subject: [PATCH 18/18] update branches --- .github/workflows/docs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 80dafce..5ba4276 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -2,6 +2,8 @@ name: Deploy Docs on: push: + branches: + - main permissions: contents: read