I have a file in a git repository (my config. files) which I want to add to another repository (my website).

One alternative would be to do things manually. Just copy the file, commit and push.

How can I have this happen automatically?

The easiest thing would be for my repository to automatically update the other repository when the file changes.