build(workflows): include .docc files in documentation workflow triggers #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Documentation | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - "Package.swift" | |
| - "Sources/**/*.swift" | |
| - "Sources/**/*.docc/**" | |
| - ".github/workflows/documentation.yaml" | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| runs-on: macos-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build DocC | |
| run: | | |
| xcodebuild docbuild -scheme QuickActionsKit \ | |
| -derivedDataPath /tmp/docbuild \ | |
| -destination 'generic/platform=iOS'; | |
| $(xcrun --find docc) process-archive \ | |
| transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/QuickActionsKit.doccarchive \ | |
| --hosting-base-path QuickActionsKit \ | |
| --output-path docs; | |
| echo "<script>window.location.href += \"/documentation/quickactionskit\"</script>" > docs/index.html; | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: 'docs' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |