Open ef4 opened 6 years ago
I have a vague memory of trying to use the script
provider back when we were originally setting up automatic deployment here and running into difficulty, but TBH I don't remember the details. There's definitely no principled reason we're not using it today, if it works.
I think I (probably incorrectly!) assumed that Travis's own key was read only. If that's not the case, then just using travis pubkey
would be both safer and better from a DX perspective than having to manually generate a keypair.
I think the travis key is read only by default, but that doesn't mean you can't use the existing instructions to paste it in as a deploy key and check the "write" checkbox. I'm verifying now with the ember-animated deploy, if that works I can PR what we did there.
Great, thank you! ❤️
Update: the switch to script deploys worked great, and properly fails your build if the deploy fails.
The use of the built-in Travis key turns out not to be a good idea after all -- Travis's own docs stopped recommending people try to use that for deploys, and they tell you to generate your own keypair as the addon-docs docs already do.
We noticed a couple issues with the documented steps for automating deployment from Travis.
By using
after_success
, a failed deployment counts as a successful build. There's no feedback that would cause anybody to notice if the deploy is failing. I would suggest using Travi's realdeploy
phase support with the script provider instead. It even has built-in support for saying "only tagged builds or master" without manually including a bash condition.The instructions make the user generate a new keypair, but travis already has a dedicated keypair for every repo, and this is necessarily safer than making your own because the private key never leaves Travis. To obtain the public key that goes with the repo, you just run
travis pubkey
.We can PR documentation changes addressing these, but I wanted to check in first and make sure there isn't some reason I don't know about for sticking to the existing way.