diff --git a/.github/workflows/documentation-deployment.yml b/.github/workflows/documentation-deployment.yml index ab9e47d..6df807a 100644 --- a/.github/workflows/documentation-deployment.yml +++ b/.github/workflows/documentation-deployment.yml @@ -12,50 +12,21 @@ on: push: branches: - main + pull_request: workflow_dispatch: -permissions: - contents: read - pages: write - id-token: write - concurrency: - group: "pages" + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - deploydocs: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: macos-14 - steps: - - uses: actions/checkout@v4 - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - name: Check environment - run: | - xcodebuild -version - swift --version - echo "env.selfhosted: ${{ env.selfhosted }}" - - name: Build DocC - run: | - xcodebuild docbuild -scheme TemplateApplication \ - -derivedDataPath .derivedData \ - -destination 'generic/platform=iOS' \ - -skipPackagePluginValidation \ - CODE_SIGN_IDENTITY="" \ - CODE_SIGNING_REQUIRED=NO - $(xcrun --find docc) process-archive \ - transform-for-static-hosting .derivedData/Build/Products/Debug-iphoneos/TemplateApplication.doccarchive \ - --hosting-base-path SpeziTemplateApplication \ - --output-path .docs - echo "" > .docs/index.html - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: '.docs' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + docs: + name: Documentation Deployment + uses: StanfordBDHG/.github/.github/workflows/docc-github-pages.yml@v2 + permissions: + contents: read + pages: write + id-token: write + with: + scheme: 'TemplateApplication' + dryrun: ${{ github.ref != 'main' }}