First try to fix the README
It's just a first try to fix the readme. You also need to fix the code in order to have your script working again with the latest GitLab APIs.
I think use deployment jobs already, which is good: https://docs.gitlab.com/ee/ci/jobs/index.html#deployment-jobs
But.. then use the deployment events to retrieve a web-hook trigger: https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#deployment-events?
You could also use job artifacts instead: https://docs.gitlab.com/ee/api/job_artifacts.html to get the artifact. It really depends how you want to write your new code.
You know what. I created the same project in NodeJS. You might want to check it out! https://github.com/danger89/gitlab-deployer