This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
Merge pull request #6 from AgoraIO-Community/410-update #13
This file contains 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: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["main"] | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: macos-12 | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Build All DocC 🛠 | |
run: | | |
xcodebuild docbuild -scheme AgoraUIKit -derivedDataPath /tmp/docbuild -destination 'platform=macOS'; | |
$(xcrun --find docc) process-archive \ | |
transform-for-static-hosting /tmp/docbuild/Build/Products/Debug/AgoraUIKit.doccarchive \ | |
--output-path docs \ | |
--hosting-base-path VideoUIKit-macOS; | |
echo "<script>window.location.href += \"/documentation/agorauikit\"</script>" > docs/index.html | |
mkdir -pv docs/extensions/AgoraRtmControl | |
$(xcrun --find docc) process-archive \ | |
transform-for-static-hosting /tmp/docbuild/Build/Products/Debug/AgoraRtmControl.doccarchive \ | |
--output-path docs/extensions/AgoraRtmControl \ | |
--hosting-base-path VideoUIKit-macOS/extensions/AgoraRtmControl; | |
echo "<script>window.location.href += \"documentation/agorartmcontrol\"</script>" > docs/extensions/AgoraRtmControl/index.html; | |
xcodebuild docbuild -scheme AgoraAppGroupDataHelper -derivedDataPath /tmp/docbuild -destination 'platform=macOS'; | |
mkdir -pv docs/extensions/AgoraAppGroupDataHelper | |
$(xcrun --find docc) process-archive \ | |
transform-for-static-hosting /tmp/docbuild/Build/Products/Debug/AgoraAppGroupDataHelper.doccarchive \ | |
--output-path docs/extensions/AgoraAppGroupDataHelper \ | |
--hosting-base-path VideoUIKit-macOS/extensions/AgoraAppGroupDataHelper; | |
echo "<script>window.location.href += \"documentation/AgoraAppGroupDataHelper\"</script>" > docs/extensions/AgoraAppGroupDataHelper/index.html; | |
- name: Upload artifact 📜 | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
# Upload docs directory | |
path: 'docs' | |
- name: Deploy to GitHub Pages 🐙 | |
id: deployment | |
uses: actions/deploy-pages@v1 |