This gist is an example of how to use a Makefile for working with Kirby CMS.
It exposes a few different tasks:
make devstarts a dev server on localhost:9000, running Tailwind CSS and esbuild watcher processes in the background.make buildbuilds a set of minified production assetsmake deployruns a build and then usesrsyncto deploy to a remote server, defined by theDEPLOY_variables at the topmake contentdownloads content from the remote server, deleting any local files. This makes it easy to test against production data in your local environment.make kirbyupgrades Kirby to the latest version by fetching the new files from GitHubmake cleanremoves any built files
The .deploy file is a simple text file that we pass to rsync to tell it which files and folders to sync. This helps avoid syncing sensitive or local data like the license file or user account information. You can add or remove lines as needed.