Skip to content

hotfix: unblock deploy build (visitor-tracker auth env)#43

Merged
GhDj merged 1 commit into
mainfrom
hotfix/deploy-build-env
Apr 29, 2026
Merged

hotfix: unblock deploy build (visitor-tracker auth env)#43
GhDj merged 1 commit into
mainfrom
hotfix/deploy-build-env

Conversation

@GhDj
Copy link
Copy Markdown
Owner

@GhDj GhDj commented Apr 29, 2026

Problem

v1.4.0 deploy failed at the `composer install` step:

```
Visitor Tracker dashboard is enabled but unprotected. Configure at
least one of: visitor-tracker.dashboard.token (env
VISITOR_TRACKER_TOKEN), visitor-tracker.dashboard.gate, or add an auth
middleware (e.g. "auth") to visitor-tracker.dashboard.middleware.
```

Same root cause as the earlier CI fix: `composer install` runs
`package:discover` (a post-autoload-dump script), which boots the
visitor-tracker service provider, which trips its dashboard guard
because the GitHub runner has none of the env vars set on the OVH
server's .env file.

Fix

Set `VISITOR_TRACKER_ALLOW_UNPROTECTED=true` at the deploy job level.
Mirrors prod posture (Cloudflare Access still gates `/admin/` at the
edge in prod), and only affects build-time `package:discover` — the
server's .env continues to drive runtime behavior, and `deploy.yml`
already strips `bootstrap/cache/
.php` before SFTP so no build-time
config leaks to prod.

Also removes a tracked local IDE config file that should not have
been committed.

After merge

Re-run the deploy workflow (`workflow_dispatch`) to ship v1.4.0.

The deploy workflow's composer install runs package:discover as a
post-autoload-dump script, which boots the visitor-tracker package.
Its dashboard guard throws on boot if no auth method is configured,
and the GitHub runner sees none of the env vars from the server's
.env file — so the deploy step was failing before SFTP could run.

Set VISITOR_TRACKER_ALLOW_UNPROTECTED=true at the job level to mirror
prod posture (server's .env continues to drive runtime behavior; this
only unblocks the build).

Also removes a tracked local IDE config file that should not be in
version control.
@GhDj GhDj merged commit 013eda2 into main Apr 29, 2026
@GhDj GhDj deleted the hotfix/deploy-build-env branch April 29, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant