Skip to content

Commit

Permalink
Update docc.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
marekVrican authored Sep 25, 2024
1 parent af6783a commit 3f71401
Showing 1 changed file with 0 additions and 69 deletions.
69 changes: 0 additions & 69 deletions .github/workflows/docc.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1 @@
#1
name: docc

#2
on:
push:
branches: [main]
workflow_dispatch:

#3
permissions:
pages: write
id-token: write
contents: read

#1
jobs:
build:
#2
runs-on: macos-latest
#3
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Select latest Xcode version
run: sudo xcode-select -s /Applications/Xcode_15.0.app
#4
- name: Run Build Docs
run: |
REPOSITORY_NAME="${{ github.event.repository.name }}"
PACKAGE_NAME="GoodPersistence"
PACKAGE_NAME_LOWERCASE=$(echo "$PACKAGE_NAME" | tr '[:upper:]' '[:lower:]')
xcrun xcodebuild docbuild \
-scheme "$PACKAGE_NAME" \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath "$PWD/.derivedData"
$(xcrun --find docc) process-archive \
transform-for-static-hosting "$PWD/.derivedData/Build/Products/Debug-iphonesimulator/${PACKAGE_NAME}.doccarchive" \
--output-path ".docs" \
--hosting-base-path "$REPOSITORY_NAME"
# Create index.html to redirect to the generated documentation
echo '<script>window.location.href += "/documentation/'"${PACKAGE_NAME_LOWERCASE}"'"</script>' > .docs/index.html
#5
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: .docs
#1
deploy:
#2
runs-on: ubuntu-latest
#3
needs: build
#4
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

0 comments on commit 3f71401

Please sign in to comment.