DocPad: rsync Deploy Script
✓ Published0🌍 Public
HHypercubed
Last edited Jun 18, 2013
Created on Jun 18, 2013
This example shows a shell script that automates deploying a static website via rsync to a remote server. It defines environment variables for the source directory, destination directory, server, and account, then runs `docpad generate` to build the site before syncing files. The script supports a dry-run mode with the `-n` flag and excludes specified patterns like `.git` and `.svn` using a `.deployignore` file. It relies on the `rsync` command-line tool and the `docpad` static site generator, with the deployment target specified as a user@host:path.
AI-generated descriptionDocPad: rsync Deploy Script
- Place
deploy.shin{docpad folder}/bin/ - Create (or edit) a
.envfile in your docpad folder with the following values:
#!/bin/bash
DEPLOY_SOURCE_DIR="out/"
DEPLOY_DEST_DIR="~/public_html/"
DEPLOY_SERVER=deploy-server-name
DEPLOY_ACCOUNT=deploy-login-name
- Create a
.deployignorefile in docpad folder with the following values:
**.svn
.git
.gitignore
- Test with
./bin/deploy.sh -ndeploy with./bin/deploy.sh