Initial commit. #10
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: Documentation | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
publish: | |
name: Publish Documentation | |
# TODO: Use `macos-latest` after the macOS 13 image graduates to GA. | |
# https://github.com/actions/runner-images/issues/7508#issuecomment-1718206371 | |
runs-on: macos-13 | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Set up GitHub Pages | |
uses: actions/configure-pages@v3 | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- name: Print Swift compiler version | |
run: "swift --version" | |
- uses: actions/checkout@v3 | |
- name: Generate documentation | |
run: "swift package generate-documentation --target HTTPErrorHandling --disable-indexing --include-extended-types --transform-for-static-hosting --hosting-base-path swift-http-error-handling" | |
- name: Upload documentation | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: ".build/plugins/Swift-DocC/outputs/HTTPErrorHandling.doccarchive" | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |