Skip to content

๐Ÿ”— DocC ๋งํฌ ์ˆ˜์ • - GitHub Pages URL๋กœ ํ†ต์ผ #33

๐Ÿ”— DocC ๋งํฌ ์ˆ˜์ • - GitHub Pages URL๋กœ ํ†ต์ผ

๐Ÿ”— DocC ๋งํฌ ์ˆ˜์ • - GitHub Pages URL๋กœ ํ†ต์ผ #33

Workflow file for this run

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