Currently, we use the environment variable LUCID_APPLICATION_ID to determine whether the user is executing their deploy within a project, and if it is, create the output with an association to that project. We should also update the project association if the user redeploys from a different project.
Also see rstudio/rsconnect#815.