Merge pull request #36 from maclong9/next #30
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: Publish Swift DocC | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
publish-docs: | |
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, 'docs:') | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Swift | |
uses: swift-actions/setup-swift@v2 | |
with: | |
swift-version: "6.1" | |
- name: Build DocC documentation | |
run: | | |
mkdir -p docs-output | |
swift package --allow-writing-to-directory ./docs-output \ | |
generate-documentation \ | |
--target WebUI \ | |
--disable-indexing \ | |
--transform-for-static-hosting \ | |
--hosting-base-path web-ui \ | |
--output-path ./docs-output | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs-output | |
publish_branch: docs | |
force_orphan: true |