deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.52k stars 1.48k forks source link

Missing YAML docs #2971

Closed gglnx closed 6 days ago

gglnx commented 2 years ago

I'm using an deploy.yaml with runLocally to prebuild my assets:

tasks:
  deploy:assets:
    - runLocally: 'yarn install && yarn build'
    - upload:
        src: web/assets/
        dest: '{{release_path}}/web/assets'

This is the verbose output:

task deploy:assets
[hostname] /opt/homebrew/Cellar/php@7.4/7.4.27/bin/php /vendor/deployer/deployer/bin/dep worker --port 50806 --task deploy:assets --host hostname --decorated -vvv
[hostname] rsync '-azP' '-e' 'ssh '\''-A'\'' '\''-o'\'' '\''ControlMaster=auto'\'' '\''-o'\'' '\''ControlPersist=60'\'' '\''-o'\'' '\''ControlPath=/Users/dennis/.ssh/deploy@hostname'\''' 'web/assets/' 'deploy@hostname:/web/craft-cms/releases/19/web/assets'
[hostname] sending incremental file list
[hostname] rsync: [sender] change_dir "/web/assets" failed: No such file or directory (2)
[hostname] rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1350) [sender=3.2.3]
[hostname]  error  in Importer.php on line 181:
[hostname] exit code 23 (Unknown error)

The uploads fails because web/assets wasn't generated by the runLocally build.

Upvote & Fund

Fund with Polar

antonmedv commented 2 years ago

Found the issue:

-    - runLocally: 'yarn install && yarn build'
+    - run_locally: 'yarn install && yarn build'
antonmedv commented 2 years ago

Add docs to prevent misuse of YAML (runLocally instead of run_locally).

github-actions[bot] commented 6 days ago

This issue has been automatically closed. Please, open a discussion for bug reports and feature requests.

Read more: [https://github.com/deployphp/deployer/discussions/3888]