Deploy DocC Documentation #23
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 DocC Documentation | |
on: | |
workflow_run: | |
workflows: ["Run Tests"] | |
types: | |
- completed | |
jobs: | |
build: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Generate DocC Documentation | |
run: swift package generate-documentation --target WingedSwift --output-path ./docs | |
- name: Export DocC as HTML | |
run: | | |
swift package --allow-writing-to-directory ./docs \ | |
generate-documentation --target WingedSwift \ | |
--disable-indexing \ | |
--transform-for-static-hosting \ | |
--hosting-base-path Winged-Swift \ | |
--output-path ./docs | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
publish_dir: ./docs |