If your project requires a runtime, you might wish to define which files should be persistent and which commands should be executed remotely. You can do this by using the
.deploy-now. The information stored in this file is used to define the part of the GitHub action that manages the deployment to our infrastructure.
When working with static sites, the only deployment setting you need ist the dist folder. You can adapt this directly by customizing GitHub actions.
Supporting PHP runtimes is currently in alpha. You can join our alpha by following these instructions.
version: 1.0 deploy: # comment in one of the following lines to force the use of the recurring or bootstrap configuration # force: recurring # force: bootstrap # configure the initial deployment of each branch bootstrap: # directories that are not overwritten or removed by the next deployment excludes: - samplefolder - samplefile.txt - folder/withfile.txt # commands that are executed on the runtime after new files are copied post-deployment-remote-commands: - touch database.sqlite - php8.0-cli -r "echo 'do something with php';" # configure all following deployments of each branch recurring: # directories that are not overwritten or removed by the next deployment excludes: - samplefolder - samplefile.txt - folder/withfile.txt - database.sqlite # commands that are executed on the runtime before new files are copied pre-deployment-remote-commands: - echo "starting maintenance mode" # commands that are executed on the runtime after new files are copied post-deployment-remote-commands: - echo "clearing caches" - php8.0-cli -r "echo 'do something with php again';" - echo "leaving maintenance mode" - echo "back again"
Configure initial and following deployments
The directories you want to exclude and the commands you want to execute on your runtime might differ between initial deployments (
bootstrap) and any following deployment (
recurring). By default, the first deployment action of a newly connected branch always uses
bootstrap, whereas any following deployment action is based on
recurring. You have the option to force the use of either one.
Per default, all files in your defined dist folder are copied to the infrastructure after every git commit. If you want to prevent certain directories from being copied, you can list them under
Excludes also prevent files that are created by your application from beeing deleted. If you want to copy files to the infrastructure on your initial deployment, but keep them persistent afterwards, you can do this by adding them to the
Executing commands on the runtime
You can execute commands on your runtime after
recurring deployments by listing them under
post-deployment-remote-commands and before
recurring deployments using