Share your repls and programming experiences

← Back to all posts
Repl.deploy: Automatically deploy from GitHub to Replit, lightning fast ⚡️
h
KhushrajRathod (17)

While deploying projects from GitHub to Replit, do you

  • Commit
  • Push to GitHub
  • Open Replit
  • Pull changes
  • Stop, and
  • Re-run?

or, even worse, merge a pull request and then forget to pull changes manually?

Now you don't need to do all of that! Introducing, repl.deploy, a combination of a GitHub app, written in TypeScript, and a Daemon, written in Go. repl.deploy lets you automatically deploy from GitHub to Replit, lightning fast ⚡️

GitHub Repository (+ Usage): https://github.com/KhushrajRathod/repl.deploy
GitHub Marketplace: https://github.com/marketplace/repl-deploy
Product hunt: https://www.producthunt.com/posts/repl-deploy


How it works:

  • When you commit, GitHub sends an event to a hosted instance of the repl.deploy server
  • A payload consisting of both the endpoint and the current time is prepared and signed with an RSA private key
  • The daemon running on the repl recieves the payload, and
    • Verifies the signature
    • Checks that the endpoint matches (this is to prevent someone from just forwarding a signed request to your repl and causing it to restart)
    • Checks that the timestamp is less than 15 seconds old (this is to prevent someone from abusing a signature in the event that a signed request is leaked by you)
  • If the request is valid, the daemon
    • runs git fetch --all and then git reset --hard origin/main
    • restarts your program
Comments
hotnewtop
zplusfour (890)

awesome
just saw that on github :)

Whippingdot (570)

wait a sec...how do I test this. How does ur server know which repl is for the github repo?

KhushrajRathod (17)

@Whippingdot Its part of the config file! Instructions on how to use it in the README: https://github.com/KhushrajRathod/repl.deploy

MarcusWeinberger (774)

This is extremely cool and super useful!

RayhanADev (1941)

:O

kewl! I love Replit projects for Replit :D