ryanvilbrandt / comic_git

A statically-hosted web comic server core intended to be hosted on github.io. For help getting started, click the Wiki link above!
23 stars 7 forks source link

Create SFTP deploy script #42

Closed ryanvilbrandt closed 4 years ago

ryanvilbrandt commented 4 years ago

For the inevitable case where a user will want to deploy comic_git to somewhere other than GitHub, include a separate script that will do the following:

  1. Switch to master branch (configurable)
  2. Build site
  3. Push site to SFTP endpoint (host, username, password, and root directory all configurable)
  4. Switch back to working branch (configurable)

We will likely want to convert the "Delete scheduled folders" option from config.ini to a function param/command line option, to allow the sftp_deploy script to enable it. Ooooo, and we can have GitHub specifically call the build_site.py script with that flag, so it doesn't need to check where it's running!

ryanvilbrandt commented 4 years ago

Added the --delete-scheduled-posts flag to build_site.py, and set GitHub to use that instead of relying on detecting if it's running on GitHub.

However, the auto-deploy script turned out to be so conceptually simple but technically frustrating that I didn't make it. Instead, I added suggested steps to https://github.com/ryanvilbrandt/comic_git/wiki/Advanced-Tips#hosting-comic_git-outside-of-github-pages and called it good.