Skip to content

Format

Format #34

Workflow file for this run

name: Deploy Documentation
on:
push:
branches: ["main"]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
DeployDocs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: Install nightly Swift
run: |
DOWNLOAD=$(curl "https://raw.githubusercontent.com/apple/swift-org-website/main/_data/builds/development/xcode.yml" | yq '.[0].download')
DIR=$(curl "https://raw.githubusercontent.com/apple/swift-org-website/main/_data/builds/development/xcode.yml" | yq '.[0].dir')
curl -L -sS --show-error --fail "https://download.swift.org/development/xcode/$DIR/$DOWNLOAD" -o $DOWNLOAD
sudo installer -store -pkg $DOWNLOAD -target /
- name: Select Xcode
run: sudo xcode-select -s '/Applications/Xcode_15.3.app'
- name: Install Playdate SDK
run: |
curl -L -sS --show-error --fail "https://download.panic.com/playdate_sdk/PlaydateSDK-latest.zip" -o PlaydateSDK-latest.zip
unzip PlaydateSDK-latest.zip
sudo installer -store -pkg "PlaydateSDK.pkg" -target /
- name: Build
run: |
xcodebuild docbuild -scheme PlaydateKit \
-configuration Release \
-derivedDataPath /tmp/docc \
-destination 'platform=macOS' \
-toolchain "swift latest";
$(xcrun -f docc -toolchain "swift latest") process-archive \
transform-for-static-hosting $(find /tmp/docc -type d -name '*.doccarchive') \
--hosting-base-path PlaydateKit \
--output-path docs;
- name: Upload
uses: actions/upload-pages-artifact@v1
with:
path: 'docs'
- name: Deploy
id: deployment
uses: actions/deploy-pages@v1