Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Upload files only #286

Open
btxtiger opened this issue May 1, 2022 · 1 comment
Open

Upload files only #286

btxtiger opened this issue May 1, 2022 · 1 comment

Comments

@btxtiger
Copy link

btxtiger commented May 1, 2022

I'm trying to just upload my local release build, but it seems shipit always expects any git repo. How can I disable this?

module.exports = (shipit) => {
   require('shipit-deploy')(shipit);

   shipit.initConfig({
      prod: {
         servers: [
            {
               host: 'shop.com',
               user: 'shop',
            },
         ],
         repositoryUrl: '',
         keepReleases: 10,
         deployTo: '/var/www/frontend',
         rsyncFrom: './dist/frontend',
         copy: false
      },
   });
};

Output:

...
Release path created.
Copy project to remote servers.
"copy" method is deprecated, please use "copyToRemote", "copyFromRemote", "scpCopyToRemote" or "scpCopyFromRemote". It will break in v5.0.0.
Copy "/Users/shop/repositories/frontend/dist/frontend/" to "shop@shop.com:/var/www/frontend/releases/20220501183534" via rsync
shop@shop.com's password:
Finished copy.
Setting current revision and creating revision file.
Running "git rev-parse master" on local.
@ fatal: not a git repository (or any of the parent directories): .git
'deploy:update' errored after 9.19 s
Error: Command failed: git rev-parse master
fatal: not a git repository (or any of the parent directories): .git

    at ChildProcess.exithandler (node:child_process:397:12)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:390:28)
    at Pipe.<anonymous> (node:net:687:12)
@MatthijsReyers
Copy link

MatthijsReyers commented Jul 22, 2022

I was wondering the same thing, it's not possible as far as I can tell. Overwriting the built-in deploy:fetch or deploy:update events does not seem to be supported either. (Nevermind that, you can overwrite them, but that doesn't quite fix the problem either).

Best I've come up with so far is creating a custom deploy task that just copies over the files, but that's obviously not ideal since you lose the releases/rollback system unless you implement those yourself as well.

With the state of the project being what it is though I suspect that waiting for the maintainers to make the repository aspect fully optional is futile.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants