Skip to content

Commit

Permalink
hm
Browse files Browse the repository at this point in the history
  • Loading branch information
dankinsoid committed Mar 22, 2024
1 parent 46e68e5 commit 9348039
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/docc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: DocC Runner

on:
push:
branches: ["main"]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

# A single job that builds and deploys the DocC documentation
jobs:
deploy:
environment:
name: github-pages
url: $
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- id: pages
name: Setup Pages
uses: actions/configure-pages@v4
- name: Select Latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Build DocC
run: |
swift package resolve;
xcodebuild docbuild -scheme swift-api-client -derivedDataPath /tmp/docbuild -destination 'generic/platform=iOS';
$(xcrun --find docc) process-archive \
transform-for-static-hosting /tmp/docbuild/Build/Products/Debug-iphoneos/swift-api-client.doccarchive \
--output-path docs \
--hosting-base-path 'swift-api-client';
echo "<script>window.location.href += \"/documentation/swift-api-client\"</script>" > docs/index.html;
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs'
- id: deployment
name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4

0 comments on commit 9348039

Please sign in to comment.