Fixes #360. #237
Workflow file for this run
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 Documentation | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
Build: | |
runs-on: macos-15 | |
steps: | |
- name: Install SourceKitten | |
run: brew install sourcekitten | |
- name: Install Jazzy | |
run: sudo gem install jazzy | |
# They don't support Swift 6 yet. | |
# https://github.com/swift-actions/setup-swift/issues/683 | |
# - name: Install Swift | |
# uses: swift-actions/setup-swift@v2 | |
# with: | |
# swift-version: "5.10.0" | |
- name: Confirm Swift Version | |
run: swift --version | |
- name: Install Swiftarr Dependencies | |
run: brew install gd | |
- name: Checkout Swiftarr | |
uses: actions/checkout@v2 | |
- name: Generate Docs | |
run: scripts/generatedocs.sh | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
name: github-pages | |
path: docs/Output | |
deploy: | |
if: github.repository == 'jocosocial/swiftarr' && github.ref == 'refs/heads/master' | |
needs: Build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |