Grav Deploy Best Practice

This is my way to deploy:

#!/bin/bash
USER=USER_NAME
SERVER=SERVER_NAME
DOMAIN=DOMAIN_NAME

rsync --delete -rvzce ssh . ${USER}@${SERVER}:/homepages/${USER}/${DOMAIN} \
      --exclude /.git \
      --exclude /.idea \
      --exclude /assets \
      --exclude /tmp \
      --exclude /cache \
      --exclude /images \
      --exclude /backup \
      --exclude /logs \
      --exclude system.yaml

ssh ${USER}@${SERVER} "cd ${DOMAIN} && bin/grav clearcache"
1 Like