Merge pull request #22 from surfstudio/fix/mac-os-runner #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: Deploy DocC | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| # используем не последний, так как в актуальной версии сломаны пути | |
| # и process-archive не может найти в derivedData архив с документацией | |
| runs-on: macOS-14 | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v3 | |
| - name: Init | |
| run: | | |
| make init | |
| - name: Build DocC | |
| run: | | |
| xcodebuild docbuild -skipMacroValidation -workspace SurfPlaybook.xcworkspace -scheme SurfPlaybook \ | |
| -derivedDataPath docc \ | |
| -destination 'generic/platform=iOS' \ | |
| CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO; | |
| $(xcrun --find docc) process-archive \ | |
| transform-for-static-hosting ./docc/Build/Products/Debug-iphoneos/SurfPlaybook.doccarchive \ | |
| --hosting-base-path SurfPlaybook \ | |
| --output-path docs; | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'docs' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v3 |