๐ DocC ๋งํฌ ์์ - GitHub Pages URL๋ก ํต์ผ #33
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 HIG Lab | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| 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 }} | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Select Xcode 16 | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.0' | |
| # ======================================== | |
| # ๐ฆ ๋ฐฐํฌ ํด๋ ์ด๊ธฐํ | |
| # ======================================== | |
| - name: Prepare output | |
| run: mkdir -p deploy/tutorials | |
| # ======================================== | |
| # ๐ ๋ธ๋ก๊ทธ ์ฌ์ดํธ ๋ณต์ฌ (์ ์ฒด) | |
| # ======================================== | |
| - name: Copy blog site | |
| run: | | |
| # site ํด๋ ์ ์ฒด๋ฅผ deploy๋ก ๋ณต์ฌ (index.html + ๋ชจ๋ ๋ธ๋ก๊ทธ ํด๋) | |
| cp -r site/* deploy/ | |
| # ======================================== | |
| # ๐ DocC: Widgets | |
| # ======================================== | |
| - name: Build DocC - Widgets | |
| run: | | |
| cd tutorials/widgets | |
| swift package resolve | |
| xcodebuild docbuild \ | |
| -scheme HIGWidgets \ | |
| -derivedDataPath /tmp/docbuild-widgets \ | |
| -destination 'platform=macOS' | |
| $(xcrun --find docc) process-archive \ | |
| transform-for-static-hosting \ | |
| /tmp/docbuild-widgets/Build/Products/Debug/HIGWidgets.doccarchive \ | |
| --output-path ../../deploy/tutorials/widgets \ | |
| --hosting-base-path HIGLab/tutorials/widgets | |
| # ======================================== | |
| # ๐ DocC: ActivityKit | |
| # ======================================== | |
| - name: Build DocC - ActivityKit | |
| run: | | |
| cd tutorials/activitykit | |
| swift package resolve | |
| xcodebuild docbuild \ | |
| -scheme HIGActivityKit \ | |
| -derivedDataPath /tmp/docbuild-activitykit \ | |
| -destination 'platform=macOS' | |
| $(xcrun --find docc) process-archive \ | |
| transform-for-static-hosting \ | |
| /tmp/docbuild-activitykit/Build/Products/Debug/HIGActivityKit.doccarchive \ | |
| --output-path ../../deploy/tutorials/activitykit \ | |
| --hosting-base-path HIGLab/tutorials/activitykit | |
| # ======================================== | |
| # ๐ DocC: App Intents | |
| # ======================================== | |
| - name: Build DocC - AppIntents | |
| run: | | |
| cd tutorials/appintents | |
| swift package resolve | |
| xcodebuild docbuild \ | |
| -scheme HIGAppIntents \ | |
| -derivedDataPath /tmp/docbuild-appintents \ | |
| -destination 'platform=macOS' | |
| $(xcrun --find docc) process-archive \ | |
| transform-for-static-hosting \ | |
| /tmp/docbuild-appintents/Build/Products/Debug/HIGAppIntents.doccarchive \ | |
| --output-path ../../deploy/tutorials/appintents \ | |
| --hosting-base-path HIGLab/tutorials/appintents | |
| # ======================================== | |
| # ๐ DocC: StoreKit | |
| # ======================================== | |
| - name: Build DocC - StoreKit | |
| run: | | |
| cd tutorials/storekit | |
| swift package resolve | |
| xcodebuild docbuild \ | |
| -scheme HIGStoreKit \ | |
| -derivedDataPath /tmp/docbuild-storekit \ | |
| -destination 'platform=macOS' | |
| $(xcrun --find docc) process-archive \ | |
| transform-for-static-hosting \ | |
| /tmp/docbuild-storekit/Build/Products/Debug/HIGStoreKit.doccarchive \ | |
| --output-path ../../deploy/tutorials/storekit \ | |
| --hosting-base-path HIGLab/tutorials/storekit | |
| # ======================================== | |
| # ๐ DocC: ARKit | |
| # ======================================== | |
| - name: Build DocC - ARKit | |
| run: | | |
| cd tutorials/arkit | |
| swift package resolve | |
| xcodebuild docbuild \ | |
| -scheme HIGARKit \ | |
| -derivedDataPath /tmp/docbuild-arkit \ | |
| -destination 'platform=macOS' | |
| $(xcrun --find docc) process-archive \ | |
| transform-for-static-hosting \ | |
| /tmp/docbuild-arkit/Build/Products/Debug/HIGARKit.doccarchive \ | |
| --output-path ../../deploy/tutorials/arkit \ | |
| --hosting-base-path HIGLab/tutorials/arkit | |
| # ======================================== | |
| # ๐ DocC: Bluetooth | |
| # ======================================== | |
| - name: Build DocC - Bluetooth | |
| run: | | |
| cd tutorials/bluetooth | |
| swift package resolve | |
| xcodebuild docbuild \ | |
| -scheme HIGBluetooth \ | |
| -derivedDataPath /tmp/docbuild-bluetooth \ | |
| -destination 'platform=macOS' | |
| $(xcrun --find docc) process-archive \ | |
| transform-for-static-hosting \ | |
| /tmp/docbuild-bluetooth/Build/Products/Debug/HIGBluetooth.doccarchive \ | |
| --output-path ../../deploy/tutorials/bluetooth \ | |
| --hosting-base-path HIGLab/tutorials/bluetooth | |
| # ======================================== | |
| # ๐ DocC: Foundation Models | |
| # ======================================== | |
| - name: Build DocC - FoundationModels | |
| run: | | |
| cd tutorials/foundationmodels | |
| swift package resolve | |
| xcodebuild docbuild \ | |
| -scheme HIGFoundationModels \ | |
| -derivedDataPath /tmp/docbuild-foundationmodels \ | |
| -destination 'platform=macOS' | |
| $(xcrun --find docc) process-archive \ | |
| transform-for-static-hosting \ | |
| /tmp/docbuild-foundationmodels/Build/Products/Debug/HIGFoundationModels.doccarchive \ | |
| --output-path ../../deploy/tutorials/foundationmodels \ | |
| --hosting-base-path HIGLab/tutorials/foundationmodels | |
| # ======================================== | |
| # ๐ ๋ฐฐํฌ | |
| # ======================================== | |
| - name: Upload to Pages | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'deploy' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |