Skip to content
Sign upLog in
← Back to Community

Repl.deploy: Automatically deploy from GitHub to Replit, lightning fast ⚡️

Profile icon
Khushraj

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
Voters
Profile icon
PaoloAmoroso
Profile icon
programmeruser
Profile icon
maxina
Profile icon
zplusfour
Profile icon
Whippingdot
Profile icon
EpicGamer007
Profile icon
JhonatanTerraza
Profile icon
CookieSnowOwl
Profile icon
techpixel
Profile icon
Nanowrimoijk
Comments
hotnewtop
Profile icon
writeblankspace

Set up the /refresh endpoint, and log a line in the following format to stdout when a request is recieved: repl.deploy<insert json body here (don't include the angle brackets)><insert "Signature" header here (don't include the angle brackets)>. E.g.

What does this mean?

Profile icon
nimagp

How should we specify the branch to be deployed?

Profile icon
zplusfour

awesome
just saw that on github :)

Profile icon
Whippingdot

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

Profile icon
Khushraj

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

Profile icon
MarcusWeinberger

This is extremely cool and super useful!

Profile icon
Khushraj

@MarcusWeinberger
Glad you liked it!

Profile icon
RayhanADev

:O

kewl! I love Replit projects for Replit :D

Profile icon
Khushraj

@RayhanADev
:) Thanks!