run linking logic before deployment logic
indentation
Merge pull request #294 from alexispeter/issue-286

Run linking logic before deploying