Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My attempt at #1206. I don't know Ruby much or the codebase. This works for me at the moment, but is probably somehow broken. I wouldn't be offended if someone wanted to do this differently.
I couldn't get Ruby, bundle, rspec to work locally so I tested it by running it on my deployment 🤭. Although it turned out Travis automatically runs tests for forks of
dpl
(?) so I used that as well.Initially the idea was to export an environment variable, but it was not accessible in the
after_deploy
script. The current solution is to write a./NETLIFY_DEPLOY_JSON_ID_<SITE_ID>.json
file. If someone deploys the whole repo I guess this could be a problem, I guess home directory would be better?Turns out it's not being saved in
$TRAVIS_BUILD_DIR
as I expected but somewhere else? Does anyone know where I can find that file 🥺 ? Ok it turns out it is being saved to wherever youcd
insidebefore_deploy
which makes sense.