Ensure polling can continue after a network interruption error (#146) #42
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 Documentation | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_13.3.app/Contents/Developer | |
# NOTE: The DocC `generate-documentation` plugin does not handle the | |
# hostingBasePath well. In particular, it doesn't properly handle | |
# multiple child paths. Furthermore, the current 1.0.0 version of | |
# the plugin doesn't handle updates to the index.html or *.js | |
# files. | |
# | |
# This workflow should be revisited once Xcode 14 GA is released | |
# so the newer DocC utilities can be utilized. | |
jobs: | |
ExportToGHPages: | |
name: Export to Github Pages | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@master | |
- name: Prepare directory | |
run: | | |
mkdir -p .build/symbol-graphs | |
- name: Build Symbol Graphs | |
run: | | |
swift build \ | |
--target OktaIdx \ | |
-Xswiftc -emit-symbol-graph -Xswiftc -emit-symbol-graph -Xswiftc -emit-symbol-graph-dir -Xswiftc .build/symbol-graphs | |
- name: Generate Documentation | |
run: | | |
set +e | |
VERSION=$(git describe --tags 2>/dev/null) | |
if [[ $? -ne 0 ]]; then | |
VERSION=development | |
fi | |
set -e | |
export DOCC_JSON_PRETTYPRINT=YES | |
xcrun docc convert \ | |
Sources/OktaIdx/OktaIdx.docc \ | |
--enable-inherited-docs \ | |
--output-path OktaIdx.doccarchive \ | |
--fallback-display-name OktaIdx \ | |
--fallback-bundle-identifier com.okta.mobile.oktaidx \ | |
--fallback-bundle-version $VERSION \ | |
--additional-symbol-graph-dir .build/symbol-graphs | |
mkdir -p docs/$VERSION | |
$(xcrun --find docc) process-archive transform-for-static-hosting \ | |
OktaIdx.doccarchive \ | |
--hosting-base-path okta-idx-swift/$VERSION/oktaidx \ | |
--output-path docs/$VERSION/oktaidx | |
sed -I -e "s#<head>#<head><meta http-equiv='refresh' content='0;url=./documentation/oktaidx/'>#" \ | |
docs/$VERSION/oktaidx/index.html | |
- name: Deploy documentation to Github Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs | |
keep_files: true |