brocessing / kirby-webpack

:muscle: A Kirby CMS starter-kit with modern frontend tools
MIT License
179 stars 23 forks source link

Deploying from git #53

Closed evadecker closed 5 years ago

evadecker commented 5 years ago

Loving this, thank you for creating it. Has sped up my workflow immensely.

In the past I've used FTP to update my live site, but I'd really love to be able to deploy using git from the command line. I know how to deploy a complete git repo, but is there an easy setup to deploy only the contents of the www folder?

antoine1000 commented 5 years ago

Hi,

Thanks for your feedback. I personally use git-ftp to do this kind of thing and since then it worked pretty well.

Concerning your question, if you use git-ftp, you would have to create a .git-ftp-ignore file that contains all the folders you want to ignore when transferring your files into your server. It could looks like this:

# Ignore these folders and their content
node_modules/*
scripts/*
src/*

# Ignore these files
.babelrc
.editorconfig
.eslintrc
.nvmrc
CHANGELOG.md
kirby.config.json
LICENSE
main.config.js
package.json
package-lock.json
php-error.log
postcss.config.js
README.md
webpack.config.common.js
webpack.config.dev.js
webpack.config.prod.js
yarn.lock

Hope it answers your question.

Close this issue as it has nothing to do with kirby-webpack itself.

Edit : with git-ftp, you can also configure a syncRoot option that specifies a local directory to sync from as if it were the git project root path, for example: git config git-ftp.syncroot path/to/my/www/folder