From 19eaaade01c1cf3bde931dc2df04e38dbceb00b4 Mon Sep 17 00:00:00 2001 From: Loay Ashraf Date: Thu, 5 Oct 2023 21:00:09 +0300 Subject: [PATCH] Create build-deploy-docs (#52) --- .github/workflows/build-deploy-docs | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build-deploy-docs diff --git a/.github/workflows/build-deploy-docs b/.github/workflows/build-deploy-docs new file mode 100644 index 0000000..84e0c68 --- /dev/null +++ b/.github/workflows/build-deploy-docs @@ -0,0 +1,46 @@ +name: Build and Deploy Docs + +on: + push: + branches: + - 'develop' + + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build-deploy-docs: + name: Build and Deploy Docs + runs-on: macos-13 + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set Xcode Version + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: '15.0.0' + - name: Build Docs + env: + workspace: RxNetworkKit.xcworkspace + scheme: RxNetworkKit + destination: generic/platform=iOS Simulator + run: | + xcodebuild docbuild -workspace "${workspace}" -scheme "${scheme}" -destination "${destination}" -derivedDataPath derivedData | xcpretty && exit ${PIPESTATUS[0]} + $(xcrun --find docc) process-archive transform-for-static-hosting derivedData/RxNetworkKit.doccarchive --hosting-base-path RxNetworkKit --output-path docs + echo "" > docs/index.html + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: 'docs' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1