Commit graph

9 commits

Author SHA1 Message Date
9d41e80942 Use pm2 to run the deployed app 2021-11-02 22:49:45 -07:00
056c03fb42 Create a current version symlink
This is mostly just for convenience!
2021-11-02 21:53:20 -07:00
49cc2224b6 Refactor out a remote_versions_root variable 2021-11-02 21:29:14 -07:00
c13114b0cc Fix old version cleanup to sort by modified date
I was sorting by version name, which _was_ reliable until I changed my version name format, and then a deploy cleaned up the version it had just deployed because it no longer sorted to the end!

Rather than be dependent on a stable version name format, and set myself up for more surprises, I'm going to instead use the folder's modified time. While there could be surprising ways for folder timestamps to be updated, I expect it to be _more_ reliable overall.
2021-11-02 21:16:46 -07:00
a3859b36bf Safer deploy version names
Huh, I was previously using ISO timestamps, but it turns out Yarn doesn't handle binary paths very reliably when your folder names contain colons 😳 so `canvas` was failing with `node-gyp not found`

I've documented it here in this self-answered StackOverflow question, so hopefully the next future person searching will find my answer! https://stackoverflow.com/q/69819597/107415
2021-11-02 21:14:47 -07:00
fb5b0fe611 Add task to clean up older deployed versions 2021-11-02 19:02:36 -07:00
edd983c97a Refactor deploy to build locally, not remotely 2021-11-02 18:47:13 -07:00
d17c4cea8b Add yarn build to deploy playbook
also secret copying, which was required for the cached-data step
2021-11-02 16:45:07 -07:00
dde8cee1e3 Add deploy playbook: pulls git and installs deps 2021-11-02 16:36:39 -07:00