| Q | A
| ----------------- | ---
| Issue Type | Feature Request
| Deployer Version | 6.3.0
| Local Machine OS | All
| Remote Machine OS | All
Each time I run dep deploy ..., the deployer will immediately work, and this is how it suppose to be, but sometimes I don't have any changes in my code, and if I run dep deploy ... a new unnecessary release will be created.
For example:
I use at command to run deployer every day at midnight:
at midnight dep deploy prod
Deployer has to skip the deployment if no changes were made into the git repo.
Whenever deployer finishes, a new file contains the last commit id will be created/updated in .dep folder.
The next time we deploy, deployer has to check if the current commit id matches the existing saved one, if so then it will skip the deployment.
I will work on this if accepted.
Nice idea
Howdy!
In versoin 6.4.7, this new "feature" will break deployment, if you don't have set any repository-URL.
This could be possible if you're doing e.G. a deploy via CI by running composer + rsync to push the code to server.
This command should only run if repository is set instead of run you should use runLocally - because you don't want to run this on the server: https://github.com/deployphp/deployer/blob/v6.4.7/recipe/deploy/prepare.php#L43-L45

Commit is here: https://github.com/deployphp/deployer/commit/bb4d41c8960064f2754157d2c940bec2f927a6ab#diff-47a8209fdc160285dc659ed27fba1861
@Chrico You just need to set the check_remote_head as follows:
# your ci deploy file.
set('check_remote_head', false)
check_remote_head is false by default and never touched.
The problem is this line: https://github.com/deployphp/deployer/blob/v6.4.7/recipe/deploy/prepare.php#L45 which runs even if the repository is not set.
Additonally it could be possible, that the server has no access to the repo itself. So you should probably use runLocally instead of run here as well.
@Chrico You are right, I'll look into that. Thanks.
I dot this. :) See 85aae9fd681028c28b27a5e118d4cd3422484c8d
Usage:
require 'recipe/deploy/check_remote.php';
after('deploy:prepare', 'deploy:check_remote');
trim was added at #628, but I think this is incorrect.