Skip to content

Commit

Permalink
Create build-deploy-docs1.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
loay-ashraf authored Oct 5, 2023
1 parent bfdb319 commit 8c87326
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-deploy-docs1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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 && exit ${PIPESTATUS[0]}
$(xcrun --find docc) process-archive transform-for-static-hosting derivedData/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:
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit 8c87326

Please sign in to comment.