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
40 changes: 40 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy interactive viz to GitHub Pages

on:
push:
branches: [master]
paths:
- "docs/**"
- ".github/workflows/pages.yml"
workflow_dispatch:

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

concurrency:
group: pages
cancel-in-progress: true

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ A native iOS app that helps optimize your sleep by tracking your "sleep bank" an
3. Grant HealthKit permissions when prompted
4. Configure your sleep goal and wake time in settings

## Interactive: Midpoint + 6h grouping

Sleep sessions are assigned to a calendar day using a "midpoint + 6 hours" rule (see
`SleepSession.dateForGrouping`). An interactive visualization of this rule lives in
[`docs/index.html`](docs/index.html) and is published via GitHub Pages (enable Pages →
"GitHub Actions" in repo settings to host it).

## Privacy

- All data stays on your device
Expand Down
Loading