Merge pull request #269 from okta/par-poc #172
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 Documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - '*' | |
| env: | |
| DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer | |
| DOCC_JSON_PRETTYPRINT: YES | |
| NSUnbufferedIO: YES | |
| jobs: | |
| ExportToGHPages: | |
| name: Export to Github Pages | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Build Documentation | |
| run: | | |
| set +ex | |
| VERSION=${{ github.ref_name }} | |
| if [[ "$VERSION" = "master" ]]; then | |
| VERSION=development | |
| fi | |
| set -e | |
| export DOCC_JSON_PRETTYPRINT=YES | |
| TARGET_LIST="" | |
| mkdir -p "docs/$VERSION" | |
| echo "Initializing target list" | |
| for TARGET in $(swift package describe --type json | jq ".products[].name" | sed -e 's/"//g'); do | |
| echo "🎯 $TARGET" | |
| NAME=$(echo "$TARGET" | tr '[:upper:]' '[:lower:]') | |
| TARGET_LIST="$TARGET_LIST --target $TARGET" | |
| done | |
| echo | |
| echo "📓 Generating combined documentation" | |
| swift package --allow-writing-to-directory docs generate-documentation \ | |
| --disable-indexing \ | |
| --transform-for-static-hosting \ | |
| --hosting-base-path "okta-mobile-swift/$VERSION" \ | |
| --output-path "docs/$VERSION" \ | |
| --include-extended-types \ | |
| --symbol-graph-minimum-access-level public \ | |
| --enable-experimental-combined-documentation \ | |
| --enable-experimental-external-link-support \ | |
| --enable-experimental-overloaded-symbol-presentation \ | |
| $TARGET_LIST | |
| - name: Deploy documentation to Github Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs | |
| keep_files: true |