website-deploy 810 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. echo "--> Deploying to GitHub pages.."
  3. mkdir -p /tmp/deploy-$(ghpages_repo)
  4. # Custom steps
  5. rsync \
  6. --archive \
  7. --delete \
  8. --exclude=.git* \
  9. --exclude=node_modules \
  10. --exclude=lib \
  11. --itemize-changes \
  12. --checksum \
  13. --no-times \
  14. --no-group \
  15. --no-motd \
  16. --no-owner \
  17. ./website/public/ /tmp/deploy-$(ghpages_repo)
  18. echo 'This branch is just a deploy target. Do not edit. You changes will be lost.' > /tmp/deploy-$(ghpages_repo)/README.md
  19. cd /tmp/deploy-$(ghpages_repo) \
  20. && git init && git checkout -B $(ghpages_branch) && git add --all . \
  21. && git commit -nm "Update $(ghpages_repo) website by $${USER}" \
  22. && (git remote add origin $(ghpages_url)|| true) \
  23. && git push origin $(ghpages_branch):refs/heads/$(ghpages_branch) --force
  24. rm -rf /tmp/deploy-$(ghpages_repo)