This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
feat: optin #58
Workflow file for this run
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: Docs | |
on: | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
docs: | |
if: startsWith(github.head_ref, 'release/') | |
runs-on: macos-latest | |
steps: | |
- name: Checkout TIKI Publish Client | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Checkout PR | |
id: getpr | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh pr checkout ${{ github.event.pull_request.number }} | |
export PR_BRANCH=$(git branch --show-current) | |
echo "branch=$PR_BRANCH" >> $GITHUB_OUTPUT | |
- name: Install dependencies | |
run: | | |
cd Example | |
pod install --repo-update | |
- name: Build Docs | |
id: build_docs | |
run: | | |
export TEMP_DIR=$(mktemp -d) | |
echo "TEMP_DIR=$TEMP_DIR" >> $GITHUB_OUTPUT | |
cd Example/Pods | |
xcodebuild docbuild -scheme TikiClient -destination generic/platform=iOS | |
- name: Convert to Static | |
run: | | |
$(xcrun --find docc) process-archive transform-for-static-hosting ./Example/build/Debug-iphoneos/TikiClient/TikiClient.doccarchive --output-path docs | |
- name: Commit Docs | |
continue-on-error: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GH Action" | |
git add docs | |
git commit -m 'docs: automatic docs generation' | |
git push |