Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
20

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

Khushraj
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
2 years ago

Voters

Comments

TopNew
1
nimagp
nimagp

How should we specify the branch to be deployed?

1 year ago
2
writeblankspace
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?

1 year ago
1
zplusfour
zplusfour

awesome
just saw that on github :)

2 years ago
1
Whippingdot
Whippingdot

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

2 years ago
1
Khushraj
Khushraj

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

2 years ago
1
MarcusWeinberger
MarcusWeinberger

This is extremely cool and super useful!

2 years ago
1
RayhanADev
RayhanADev

:O

kewl! I love Replit projects for Replit :D

2 years ago
Load more