I have one repo that pushes to different domains (environments). I want to run a script that alters a file (robots.txt) based on the environment it is run in.
The language of the app is javascript on Ember.
Is there a way I can do this using Heroku? I looked at slug compilation and deploy hooks, but it doesn't look like this functionality exists with these methods.
Ways I can think of doing this are:
some sort of pre-deploy hook, where I would add a robots-production.txt robots-staging.txt and rename the proper environment file to robots.txt on deploy.
Dynamically altering the robots.txt using javascript based on the environment at runtime.
Thoughts?
Aucun commentaire:
Enregistrer un commentaire