hotfix: drop public visitor-tracker + speed up deploy#44
Merged
Conversation
The visitor-tracker dashboard is admin-only and should be reached via the package's own /admin/visitor-tracker route (gated by Cloudflare Access in production). It should not be listed as a public tool on the home page or sitemap. - Drop the Visitor Tracker entry from the home tools grid. - Remove the /tools/visitor-tracker route, sitemap entry, visitorTracker() controller method, and the public-facing view.
Most deploys only touch app/, routes/, or views — yet every deploy re-uploads the entire vendor/ tree (hundreds of MB, thousands of files), which dominates SFTP time. Make the heavy steps conditional: - Diff against the previous release tag to see what actually changed. - Run composer install (and ship vendor/) only when composer.json or composer.lock changed. - Run npm ci + vite build only when package(-lock).json, vite.config, or resources/css|js changed. Vite hashes filenames, so leftover public/build/ files on the server are harmless. - Source files (app/, routes/, resources/views/, etc.) still upload every time — they're cheap. The SFTP action has delete_remote_files: false, so skipped uploads leave the existing prod copies untouched. Add a workflow_dispatch input 'force_full' for the override case (e.g. recovering from a partial deploy or a server-side vendor wipe).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two unrelated fixes bundled
1. Drop the public Visitor Tracker tool
The visitor-tracker dashboard is admin-only — reachable through the
package's own `/admin/visitor-tracker` route gated by Cloudflare Access
in production. It should not be listed as a public tool on the home
page or sitemap, and a `/tools/visitor-tracker` page exposing the
same stats publicly is exactly what we don't want.
Removed:
2. Skip vendor and asset rebuild when their lockfiles haven't changed
SFTP-uploading `vendor/` (hundreds of MB) on every deploy was
dominating deploy time, even when only a controller or view changed.
Now the workflow diffs against the previous release tag and only:
`composer.lock` changed
`vite.config.js`, or `resources/css|js/` changed
Source files always upload (they're cheap). The SFTP action has
`delete_remote_files: false`, so skipped uploads leave the existing
prod copies untouched. Vite content-hashes asset filenames, so old
`public/build/` files are harmless leftovers.
A new `workflow_dispatch` input `force_full` is available for the
override case (e.g. recovering from a partial deploy).
Test plan
composer/npm steps to be skipped (this PR doesn't touch
`composer.lock` or `package-lock.json`); deploy should ship only
the changed source files