Merge pull request #8 from lemo-nade-room/feature/#7-CLITestKit #7
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: DocC GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'Sources/**.swift' | |
- ".github/workflows/docc-github-pages.yaml" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
key: swift-build-package-resolved-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Package.resolved') }} | |
path: .build | |
- uses: swift-actions/setup-swift@v2 | |
- name: Build DocC for CLIKit | |
run: | | |
swift package --allow-writing-to-directory ./docs/CLIKit \ | |
generate-documentation --target CLIKit \ | |
--disable-indexing \ | |
--transform-for-static-hosting \ | |
--hosting-base-path cli-kit/CLIKit \ | |
--output-path ./docs/CLIKit | |
- name: Build DocC for CLITestKit | |
run: | | |
swift package --allow-writing-to-directory ./docs/CLITestKit \ | |
generate-documentation --target CLITestKit \ | |
--disable-indexing \ | |
--transform-for-static-hosting \ | |
--hosting-base-path cli-kit/CLITestKit \ | |
--output-path ./docs/CLITestKit | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs | |
- uses: actions/deploy-pages@v4 |