forked from 1b-agent/fieldcraft-upstream
web: the deployed browser build carries the PostHog key (#305)
Pages builds main with the repository secret POSTHOG_KEY, so web users are asked the same consent question as desktop users; develop builds stay keyless. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
db80b75814
commit
c83b803f63
2 files changed
+5
-1
No files matched your search
@@ -53,6 +53,10 @@ jobs:
|
||||
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
||||
- name: Build the web app
|
||||
working-directory: apps/fieldcraft-web
|
||||
env:
|
||||
# Usage analytics only in the deployed build (main), and only with the user's consent
|
||||
# (docs/privacy.md); develop builds get an empty key, which sends nothing.
|
||||
FIELDCRAFT_POSTHOG_KEY: ${{ github.ref == 'refs/heads/main' && secrets.POSTHOG_KEY || '' }}
|
||||
run: trunk build --release --public-url /fieldcraft/
|
||||
- name: Bundle size
|
||||
run: |
|
||||
|
||||
+1
-1
@@ -80,5 +80,5 @@ A `command_run` as sent:
|
||||
The events and the policy are `fieldcraft_engine::usage`; the consent question and the settings
|
||||
are `crates/ui-egui/src/privacy.rs`; the desktop sender is `apps/fieldcraft/src/usage.rs`, the
|
||||
web one `apps/fieldcraft-web/src/usage.rs`. The PostHog project key is the build-time variable
|
||||
`FIELDCRAFT_POSTHOG_KEY`, which the release workflow sets from the repository secret
|
||||
`FIELDCRAFT_POSTHOG_KEY`, which the release workflow and the Pages build of `main` set from the repository secret
|
||||
`POSTHOG_KEY`; it is an ingest-only key. A new event or property is added here first.
|
||||
Reference in new issue
Block a user