mindok / hugodeploy Goto Github PK
View Code? Open in Web Editor NEWSimple SFTP deployment tool for static websites (e.g. created by Hugo) with optional minification
License: Apache License 2.0
Simple SFTP deployment tool for static websites (e.g. created by Hugo) with optional minification
License: Apache License 2.0
Currently files are copied to root directory of ftp server. It would be simple enough to add a rootdir option to the ftp config section and change to that directory when the ftp connection is initialised.
Hi,
I'm getting this when pushing. It's my first try so I don't know if it's correctly installed or configured.
$ hugodeploy push
Using config file: /Users/hernan/Documents/decastex-web/webhugo/hugodeploy.toml
Comparing Dst: deployed With Src: publish
Sending file: /html/about/index.xml ...
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x137e6d6]
goroutine 1 [running]:
github.com/mindok/hugodeploy/deploy.(*DeployScanner).syncRecover.func1(0xc4200f7bb0)
/Users/hernan/.go/src/github.com/mindok/hugodeploy/deploy/scan.go:102 +0xea
panic(0x143de40, 0x16c5e50)
/usr/local/Cellar/go/1.8/libexec/src/runtime/panic.go:489 +0x2cf
github.com/dutchcoders/goftp.(*FTP).send(0x0, 0x14ad279, 0x7, 0xc4200f7168, 0x1, 0x1, 0xc42013f090, 0xc4200f70e8)
/Users/hernan/.go/src/github.com/dutchcoders/goftp/ftp.go:357 +0x26
github.com/dutchcoders/goftp.(*FTP).cmd(0x0, 0x14aa1ea, 0x3, 0x14ad279, 0x7, 0xc4200f7168, 0x1, 0x1, 0xc420068000, 0x200f7158, ...)
/Users/hernan/.go/src/github.com/dutchcoders/goftp/ftp.go:145 +0x70
github.com/dutchcoders/goftp.(*FTP).Type(0x0, 0x14a9fd3, 0x1, 0xed06f395c, 0xc420138140)
/Users/hernan/.go/src/github.com/dutchcoders/goftp/ftp.go:262 +0xe0
github.com/dutchcoders/goftp.(*FTP).Stor(0x0, 0xc42000dac0, 0x15, 0x1699be0, 0xc42015a7b0, 0x0, 0x0)
/Users/hernan/.go/src/github.com/dutchcoders/goftp/ftp.go:438 +0x79
github.com/mindok/hugodeploy/deploy.(*FTPDeployer).UploadFile(0xc42013a7e0, 0xc42000dac0, 0x15, 0xc420169000, 0xcea, 0xde0, 0x1463220, 0x1)
/Users/hernan/.go/src/github.com/mindok/hugodeploy/deploy/ftp.go:129 +0x310
github.com/mindok/hugodeploy/deploy.(*FTPDeployer).ApplyCommand(0xc42013a7e0, 0xc42015a780, 0xc42015a780, 0xc42013f030)
/Users/hernan/.go/src/github.com/mindok/hugodeploy/deploy/ftp.go:108 +0xee
github.com/mindok/hugodeploy/cmd.pushDeployCommandHandler(0xc42015a780, 0xc42000cb60, 0x17)
/Users/hernan/.go/src/github.com/mindok/hugodeploy/cmd/push.go:56 +0x37
github.com/mindok/hugodeploy/deploy.(*DeployScanner).sync(0xc4200161e0, 0x14ae5c9, 0x8, 0x14adb4e, 0x7)
/Users/hernan/.go/src/github.com/mindok/hugodeploy/deploy/scan.go:230 +0x20b6
github.com/mindok/hugodeploy/deploy.(*DeployScanner).syncRecover(0xc4200161e0, 0x14ae5c9, 0x8, 0x14adb4e, 0x7, 0x0, 0x0)
/Users/hernan/.go/src/github.com/mindok/hugodeploy/deploy/scan.go:108 +0x98
github.com/mindok/hugodeploy/deploy.(*DeployScanner).Sync(0xc4200161e0, 0x14ae5c9, 0x8, 0x14adb4e, 0x7, 0x144a960, 0x1)
/Users/hernan/.go/src/github.com/mindok/hugodeploy/deploy/scan.go:94 +0xe7
github.com/mindok/hugodeploy/deploy.DeployChanges(0x14adb4e, 0x7, 0x14ae5c9, 0x8, 0x1, 0x14c9e38, 0xc42000c3a0, 0x2, 0x2, 0x1416ae0, ...)
/Users/hernan/.go/src/github.com/mindok/hugodeploy/deploy/scan.go:68 +0x132
github.com/mindok/hugodeploy/cmd.glob..func3(0x16cd940, 0x16f0108, 0x0, 0x0)
/Users/hernan/.go/src/github.com/mindok/hugodeploy/cmd/push.go:45 +0x303
github.com/spf13/cobra.(*Command).execute(0x16cd940, 0x16f0108, 0x0, 0x0, 0x16cd940, 0x16f0108)
/Users/hernan/.go/src/github.com/spf13/cobra/command.go:648 +0x231
github.com/spf13/cobra.(*Command).ExecuteC(0x16cdb60, 0xc42005e058, 0x0, 0x14b1d1a)
/Users/hernan/.go/src/github.com/spf13/cobra/command.go:734 +0x339
github.com/spf13/cobra.(*Command).Execute(0x16cdb60, 0x13d26a2, 0x16cdb60)
/Users/hernan/.go/src/github.com/spf13/cobra/command.go:693 +0x2b
github.com/mindok/hugodeploy/cmd.Execute()
/Users/hernan/.go/src/github.com/mindok/hugodeploy/cmd/root.go:50 +0x31
main.main()
/Users/hernan/.go/src/github.com/mindok/hugodeploy/main.go:20 +0x20
$
Hi,
In a hugodeploy.toml config type I couldn't make the program set the sourceDir value. I have to let the program pick the files from the "publish" directory. I tried both relative and absolute values.
By the way, I think there is a mismatch in the source code between the documented default value cmd/init.go:281
and the actual expected value cmd/root.go:81
FTP library does not currently support directory delete so a directory delete deployment command is ignored.
not sure what to do here, I'm following along with the installation and after attempting go build I get this error:
deploy/ftp.go:88: cannot use config (type tls.Config) as type *tls.Config in argument to f.ftp.AuthTLS
I am trying to use hugodeploy to deploy my files to my server via FTP. When I use hugodeploy push, it connects to the FTP successfully but does not proceed sending files.
$ ./hugodeploy push
Using config file: /home/calp/hugo/inspiritana/hugodeploy.yaml
Creating FTP connection...
Successfully connected to FTP
Comparing Dst: deployed With Src: public
Sending file: /inspiritana/404.html ...
404.zip
That's where it's "stuck" for minutes, and after a while it ends with:
ERROR: 2016/11/08 00:28:39 ftp.go:131: FTP Error uploading file: /inspiritana/404.html EOF
ERROR: 2016/11/08 00:28:39 scan.go:354: Error: EOF
The installation instructions state to set the SFTP data but my server does not support SSH, only FTP. I assume hugodeploy supports deployment via FTP since it is settable in the config?
Currently a very naive approach is used to check whether to skip/ignore files and directories.
Currently sourceDir and deployRecordDir are only tested with absolute paths.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.