Skip to content

Update build-deploy-docs.yml #12

Update build-deploy-docs.yml

Update build-deploy-docs.yml #12

name: Build and Deploy Docs
on:
push:
branches:
- 'develop'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build-deploy-docs:
name: Build and Deploy Docs
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0.0'
- name: Build Docs
env:
workspace: RxNetworkKit.xcworkspace
scheme: RxNetworkKit
destination: generic/platform=iOS Simulator
run: |
xcodebuild docbuild -workspace "${workspace}" -scheme "${scheme}" -destination "${destination}" -derivedDataPath derivedData | xcpretty;
echo "Copying DocC archives to docArchives...";
mkdir docArchives;
cp -R `find derivedData -type d -name "*.doccarchive"` docArchives;
$(xcrun --find docc) process-archive transform-for-static-hosting docArchives/RxNetworkKit.doccarchive --hosting-base-path RxNetworkKit --output-path docs;
echo "<script>window.location.href += \"/documentation/mypackage\"</script>" > docs/index.html;
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
run: |
ls
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1