fix: templates (#8) #4
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: [main] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: macos-13 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Run Build Docs | |
run: | | |
xcodebuild docbuild -scheme DragonUtilities -destination 'generic/platform=iOS Simulator' -derivedDataPath "$PWD/.derivedData"; \ | |
$(xcrun --find docc) process-archive \ | |
transform-for-static-hosting "$PWD/.derivedData/Build/Products/Debug-iphonesimulator/DragonUtilities.doccarchive" \ | |
--hosting-base-path "DragonUtilities" \ | |
--output-path .docs; | |
echo "<script>window.location.href += \"documentation/dragonutilities\"</script>" > .docs/index.html; | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: .docs | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} |