How can I make my local development version ready for installation on the server?

Good morning,

I know the title isn’t really great and I hope I can write it a bit better.

Actually I work locally (XAMPP) on my website. I use git and Github for my version control.

Also I have the kirby folder as a submodule. For CSS I use the Scout App to create the sass files which I have in a folder within the main css folder.

But now I ask me how can I push this development as easy as possible on the server?

The heavy way is to duplicate the complete folder and delete in the copy all files which are not needed. Then I can use ftp to transfer the files to the server.

But this is not the best solution.

I hope someone can help me. I use all-inkl.com with the possibility to use ssh, but I don’t really know how to use it.

Hello,

If you push your code via Git on a Github repository, you can use different deployment tools or services.

For instance, you can use a deployment tool like Ansible or if you don’t want to spend time to learn such tool, you can use a service like https://www.deployhq.com/ (but there is many other tools and services out there on the web)

These solutions allow you to select which files you don’t want to be deployed on your production server and take your Github repository as a source to deploy your code.

Be careful, these solutions use a SSH connexion so you need to be able to add your public SSH key on your sever. If you work with a VPS (Linode, Digital Océan, Vultr, Scalway …) no problem, you will have a root account to do what you want on your server.

1 Like

I use this tool: https://github.com/git-ftp/git-ftp

osX
install it with brew

add into git config file

[git-ftp]
	user = myName
	url = sftp://myserver.com/
	password = ***

create a execude file for example deploy.command

#!/bin/sh 
cd desktop/toMyDevDirectory/
git ftp push --verbose

1 Like

You have GIT both on local and production environments you can try my plugin, Auto Git:

It allows you easily deploy when pushing to a remote repository using a webhook. To set it up on your GIT provider (Github, BitBucket, Gitlab, etc), follow these instructions: https://github.com/pedroborges/kirby-autogit#autogitwebhooksecret

You may want to have a look at this thread as well: Deploying via Git

Thx for your answers.

I have a look at it all in the next days. And I hope that a first very little version of my website will be online next year.