Merge pull request #97 from will-lumley/tech/docc #9
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: "Generate DocC Documentation" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
generate-docc: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Swift | |
uses: SwiftyLab/setup-swift@v1 | |
with: | |
swift-version: '6.0.0' | |
- name: Generate DocC | |
run: | | |
swift package generate-documentation \ | |
--target FaviconFinder \ | |
--disable-indexing \ | |
--transform-for-static-hosting \ | |
--hosting-base-path FaviconFinder | |
mkdir -p docs | |
mv .build/plugins/Swift-DocC/outputs/FaviconFinder.doccarchive/* docs/ | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs |