Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 35 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Least-privilege default; the deploy-docs job elevates what it needs.
permissions:
contents: read

jobs:
docc:
name: DocC catalog
Expand All @@ -29,18 +33,38 @@ jobs:
- name: Verify Swift version
run: swift --version

# Builds the static-hosting site AND acts as the DocC validation gate on
# every PR via --warnings-as-errors. The extra static-hosting flags don't
# affect validation; they just shape the output for GitHub Pages.
- name: Build DocC catalog
run: |
swift package --allow-writing-to-directory ./docc-output \
generate-documentation --target ReliaBLE --warnings-as-errors \
--output-path ./docc-output

- name: Archive DocC output
run: ditto -c -k --sequesterRsrc --keepParent docc-output ReliaBLE-docs.zip
swift package --allow-writing-to-directory ./docs \
generate-documentation --target ReliaBLE \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path ReliaBLE \
--output-path ./docs \
--warnings-as-errors

- name: Upload DocC archive
uses: actions/upload-artifact@v4
# Only publish from master; PRs validate but do not deploy.
- name: Upload Pages artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v3
with:
name: ReliaBLE-docs
path: ReliaBLE-docs.zip
if-no-files-found: error
path: ./docs

deploy-docs:
name: Deploy documentation
if: github.ref == 'refs/heads/master'
needs: docc
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Modern library for handling BLE connections, with a focus on reliability.

## Documentation

- Getting Started [TODO DOC LINK: Add link once doc site is up]
- [ReliaBLE Documentation](https://five3apps.github.io/ReliaBLE/documentation/reliable/)
- [Getting Started](https://five3apps.github.io/ReliaBLE/documentation/reliable/gettingstarted)
Loading