Is it OK to update code on repository after publication?
Absolutely yes!  There is no reason to stop a project from evolving just because you've published about it.

What would be good to do, however, is to identify the version current at the time of publication with a release version or other similar sort of tag. You can point to the specific tag in the publication and also have the repository tag point to the publication through its associated comment text.

This will allow a reader to have the best of both worlds: access to both the most updated information and also to the precise version associated with the publication if they need it.