prepare-web-deploy 761 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env bash
  2. set -o pipefail
  3. set -o errexit
  4. set -o nounset
  5. # set -o xtrace
  6. ghpages_repo=${GHPAGES_REPO:-"transloadit/uppy"}
  7. ghpages_branch=${GHPAGES_BRANCH:-"gh-pages"}
  8. ghpages_url=${GHPAGES_URL:-"git@github.com:${ghpages_repo}.git"}
  9. localDir="${DEPLOY_DIR:-${HOME:-/home/${USER:-travis}}/.${ghpages_repo}/deploy}"
  10. echo "--> Preparing deployment in '${localDir}'.."
  11. mkdir -p "${localDir}"
  12. # Custom steps
  13. rsync \
  14. --archive \
  15. --delete \
  16. --exclude=.git* \
  17. --exclude=node_modules \
  18. --exclude=lib \
  19. --checksum \
  20. --no-times \
  21. --no-group \
  22. --no-motd \
  23. --no-owner \
  24. ./website/public/ "${localDir}" > /dev/null
  25. echo 'This branch is just a deploy target. Do not edit. You changes will be lost.' \
  26. |tee "${localDir}/README.md" > /dev/null