Created
May 8, 2024 15:35
-
-
Save sbooth/2572774ef00cbaffa61380dda14f7f18 to your computer and use it in GitHub Desktop.
DocC GitHub workflow
This file contains hidden or 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: DocC | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: pages | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Documentation | |
run: > | |
swift package | |
--allow-writing-to-directory .docs | |
generate-documentation | |
--target CAAudioHardware | |
--disable-indexing | |
--hosting-base-path CAAudioHardware | |
--output-path .docs | |
- name: Setup GitHub Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: Upload Pages Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: .docs | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment