Hello, I've a simple solution for you, declare a flag in db and when site loads, application gets that flag from DB, run a watch or background process i.e interval which verifies that code again and again and when code doesn't match, force user to reload page i.e restrict all actions, and change that code in DB when you deploy files on server,
please award me project if you don't understand it.