Skip to content

Documentation

Documentation #29

Workflow file for this run

name: Documentation
on:
push:
branches:
- main
paths:
- ".github/workflows/documentation.yml"
- "**/*.swift"
- "**/*.docc/**/*.md"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "deploy-documentation"
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build documentation
run: |
swift package --allow-writing-to-directory docs \
generate-documentation --target PoliceDataKit \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path police-data-kit \
--output-path docs
env:
SWIFTCI_DOCC: 1
- name: Upload documentation
uses: actions/upload-pages-artifact@v3
with:
path: 'docs'
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}documentation/policedatakit
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4