Skip to content

API Reference #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
46 changes: 46 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy Docs

on:
push:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO. Need to limit this to main before merging


permissions:
contents: read
pages: write
id-token: write

jobs:
build:
name: Build and test
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build Docs
run: |
xcodebuild docbuild -scheme PowerSync -destination 'platform=macOS' -derivedDataPath ./DerivedData

- name: Process Docs
run: |
xcrun docc process-archive transform-for-static-hosting ./DerivedData/Build/Products/Debug/PowerSync.doccarchive/ --output-path ./docs-site --hosting-base-path /powersync-swift

# The Docs are available at the path mentioned below. We can override the index.html to automatically redirect to the documentation page.
- name: Prepare static files
run: |
echo '<script>window.location.href += "/documentation/powersync"</script>' > ./docs-site/index.html

- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: docs-site

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4