Automatically deploy from GitHub to Replit, lightning fast ⚡️

blueprint illustration

repl.deploy

Automatically deploy from GitHub to Replit, lightning fast ⚡️

build language code size issues license version

repl.deploy - Automatically deploy from GitHub to Replit, lightning fast | Product Hunt




repl.deploy is split into

  • A GitHub app, which listens for code changes and sends events to your repl
  • A daemon, which runs on your repl, listens for events, fetches changes from GitHub and restarts your application

Table of Contents

Usage

  1. Authorize repl.deploy to get events from GitHub

  2. Make sure you have a main branch on your origin remote

  3. Add replit-deploy.json to your git repository with a single endpoint key, which is the address of your repl + /refresh. E.g.

{
    "endpoint": "https://my-amazing-application.my-username.repl.co/refresh"    
}
  1. Clone your git repository to your repl

  2. Download repl.deploy to the root of your repl -- Open the shell, and run

curl -sL https://repl-deploy.vercel.app/ -o repl.deploy.tar.gz 
tar xf repl.deploy.tar.gz
rm repl.deploy.tar.gz
  1. For repls that do not use an HTTP server in their code (See example)

    • Create/modify the .replit file in the root of your repl and change run= to run ./repl.deploy --standalone <command to run your code here>. E.g.
    run="./repl.deploy --standalone node index.js"
    
  2. For repls that use an HTTP server in their code (See example)

    • Create/modify the .replit file in the root of your repl and change run= to run ./repl.deploy <command to run your code here>. E.g.
    run="./repl.deploy node index.js"
    
    • 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.
    repl.deploy{"timestamp":1615896087141,"endpoint":"https://8c051d0fbc4b.ngrok.io/refresh"}ostjM6/jGmHbRWcHazxKWSPmvgvoIryI9XxLgNKgxPCKRW==
    
    • Your application will recieve JSON via stdin. E.g.
    {"status":"403","body":"Invalid Signature"}
    

    simply respond with the given status and body (see example)

    • Once you've responded, log (to stdout)
    repl.deploy-success
    
  3. Click Run once. Make sure your repl is set to always-on or has a pinging service set up (otherwise, the daemon will be stopped by repl once you close your browser tab)

  4. That's it! Repl.it should automatically pull changes from GitHub the next time you commit

How?

  • 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

FAQ

  • Q: What does run="./repl.deploy --standalone node index.js" do?
    A: It makes the Replit Run button run the daemon instead of executing the program directly, which then executes/re-executes the program on git push

  • Q: Does repl.deploy need to be downloaded every time the program is run?
    A: No, repl.deploy only needs to be downloaded once per repl

  • Q: What's https://repl-deploy.vercel.app/?
    A: A hosted version of getReleaseURL, which saves you the time of manually finding the latest release and linking it.

Supporters

Stargazers repo roster for @KhushrajRathod/repl.deploy

Forkers repo roster for @KhushrajRathod/repl.deploy

Owner
Khushraj Rathod
15 y.o. programmer and designer. Member of @hackclub :)
Khushraj Rathod
Comments
  • Documentation and installing

    Documentation and installing

    I have some suggestions/questions:

    1. Explain what run="./repl.deploy --standalone node index.js" does exactly
    2. Explain what the /refresh ending means.
    3. Does it need to be downloaded every time? Can I just download it once? Do I have to use this link which is not a https://github.com link: https://repl-deploy.vercel.app/? (people might ask this for security reasons)
  • Permission denied appears randomly after closing the Replit window

    Permission denied appears randomly after closing the Replit window

    Context

    All the steps in the guide work great, the bot stays awake and receives the github deploys. However, yesterday stopped performing the deploys and also didn't start the bot.

    When I checked what happened, it turned out that the ./repl.deploy file was missing permissions. I applied them again and it worked wonderfully, a few hours later the permits were missing again.

    • Console
    node v12.16.1
    >> ./repl.deploy --standalone node index.js
    sh: 1: ./repl.deploy: Permission denied
    exit status 126
    
  • Update dependency typescript to v4.2.4

    Update dependency typescript to v4.2.4

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | typescript (source) | 4.2.3 -> 4.2.4 | age | adoption | passing | confidence |


    Release Notes

    Microsoft/TypeScript

    v4.2.4

    Compare Source

    For release notes, check out the release announcement.

    For the complete list of fixed issues, check out the

    Downloads are available on:


    Configuration

    📅 Schedule: "after 1:00am and before 9:00am" in timezone Asia/Kolkata.

    🚦 Automerge: Disabled due to failing status checks.

    ♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • Update dependency @types/node-fetch to v2.5.10

    Update dependency @types/node-fetch to v2.5.10

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @types/node-fetch | 2.5.8 -> 2.5.10 | age | adoption | passing | confidence |


    Configuration

    📅 Schedule: "after 1:00am and before 9:00am" in timezone Asia/Kolkata.

    🚦 Automerge: Enabled.

    ♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • Update Rust crate sha2 to 0.9.5

    Update Rust crate sha2 to 0.9.5

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | sha2 | dependencies | patch | 0.9.3 -> 0.9.5 |


    Configuration

    📅 Schedule: "after 1:00am and before 9:00am" in timezone Asia/Kolkata.

    🚦 Automerge: Enabled.

    ♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • Update Rust crate serde to 1.0.126

    Update Rust crate serde to 1.0.126

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde | dependencies | patch | 1.0.125 -> 1.0.126 |


    Configuration

    📅 Schedule: "after 1:00am and before 9:00am" in timezone Asia/Kolkata.

    🚦 Automerge: Enabled.

    ♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • "gzip: stdin: not in gzip format"

    In step 5 of Usage:

    Download repl.deploy to the root of your repl -- Open the shell, and run curl -sL https://repl-deploy.vercel.app/ -o repl.deploy.tar.gz tar xf repl.deploy.tar.gz rm repl.deploy.tar.gz

    tar xf repl.deploy.tar.gz returns:

    gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now

    I feel like this is more of a repl.it problem, but I'll still open and issue here just in case...

  • Configure Renovate

    Configure Renovate

    WhiteSource Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • daemon/Cargo.toml (cargo)
    • .github/workflows/prerelease.yml (github-actions)
    • .github/workflows/release.yml (github-actions)
    • server/package.json (npm)

    Configuration Summary

    Based on the default config's presets, Renovate will:

    • Start dependency updates only once this onboarding PR is merged
    • Separate major versions of dependencies into individual branches/PRs
    • Do not separate patch and minor upgrades into separate PRs for the same dependency
    • Upgrade to unstable versions only if the existing version is unstable
    • Raise PRs immediately (after branch is created)
    • If semantic commits detected, use semantic commit type fix for dependencies and chore for all others
    • Keep existing branches updated even when not scheduled
    • Disable automerging feature - wait for humans to merge all PRs
    • Ignore node_modules, bower_components, vendor and various test/tests directories
    • Autodetect whether to pin dependencies or maintain ranges
    • Rate limit PR creation to a maximum of two per hour
    • Limit to maximum 20 open PRs at any time
    • Group known monorepo packages together
    • Use curated list of recommended non-monorepo package groupings
    • Ignore spring cloud 1.x releases
    • Ignore http4s digest-based 1.x milestones

    🔡 Would you like to change the way Renovate is upgrading your dependencies? Simply edit the renovate.json in this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time Renovate runs.


    What to Expect

    With your current configuration, Renovate will create 10 Pull Requests:

    Pin dependencies
    Update Rust crate serde to 1.0.126
    • Schedule: ["at any time"]
    • Branch name: renovate/serde-1.x
    • Merge into: main
    • Upgrade serde to 1.0.126
    Update Rust crate sha2 to 0.9.5
    • Schedule: ["at any time"]
    • Branch name: renovate/sha2-0.x
    • Merge into: main
    • Upgrade sha2 to 0.9.5
    Update dependency @​types/node-fetch to v2.5.10
    • Schedule: ["at any time"]
    • Branch name: renovate/node-fetch-2.x
    • Merge into: main
    • Upgrade @types/node-fetch to 2.5.10
    Update dependency typescript to v4.2.4
    • Schedule: ["at any time"]
    • Branch name: renovate/typescript-4.x
    • Merge into: main
    • Upgrade typescript to 4.2.4
    Update Rust crate regex to 1.5.4
    • Schedule: ["at any time"]
    • Branch name: renovate/regex-1.x
    • Merge into: main
    • Upgrade regex to 1.5.4
    Update Rust crate tokio to 1.6.0
    • Schedule: ["at any time"]
    • Branch name: renovate/tokio-1.x
    • Merge into: main
    • Upgrade tokio to 1.6.0
    Update dependency @​types/node to v14.17.0
    • Schedule: ["at any time"]
    • Branch name: renovate/node-14.x
    • Merge into: main
    • Upgrade @types/node to 14.17.0
    Update dependency probot to v11.3.0
    • Schedule: ["at any time"]
    • Branch name: renovate/probot-11.x
    • Merge into: main
    • Upgrade probot to 11.3.0
    Update marvinpinto/action-automatic-releases action to v1.2.0

    🚸 Branch creation will be limited to maximum 2 per hour, so it doesn't swamp any CI resources or spam the project. See docs for prhourlylimit for details.


    ❓ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • repl.deploy tells me im missing a config file

    repl.deploy tells me im missing a config file

    Im trying to make repl.deploy run a python discord bot, but when I run ./repl.deploy --standalone python -m bot it returns

    2021/04/26 18:45:48 Config file doesn't exist

  • Rust rewrite

    Rust rewrite

    • [x] Implement all functionality
    • [x] Restructure to use modules instead of packages
    • [x] Remove logger and switch to https://github.com/seanmonstar/pretty-env-logger
    • [x] Test manually
    • [x] Delete old go code
  • A setting for specify which branch should deploy

    A setting for specify which branch should deploy

    for example, I want to use replit for beta version of my discord bot. and its in a branch named development. but repl.deploy uses branch main(sorry if my text has grammatical problem)

  • Add a setting for repos that use 'master' instead of 'main'

    Add a setting for repos that use 'master' instead of 'main'

    Some repositories don't use main yet and use master. For example, my VSCode allows me to publish to GitHub, but the default branch is called master. Repl.deploy doesn't seem to watch anything from master branches.

  • Lock file maintenance all dependencies (non-major)

    Lock file maintenance all dependencies (non-major)

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | | | lockFileMaintenance | All locks refreshed | | @types/node | devDependencies | patch | All locks refreshed | | @types/sshpk | devDependencies | patch | All locks refreshed | | anyhow | dependencies | patch | All locks refreshed | | rsa | dependencies | minor | All locks refreshed | | serde | dependencies | patch | All locks refreshed | | typescript (source) | devDependencies | minor | All locks refreshed | | serde_json | dependencies | patch | All locks refreshed | | sha2 | dependencies | patch | All locks refreshed | | tokio | dependencies | minor | All locks refreshed |

    🔧 This Pull Request updates lock files to use the latest dependency versions.


    Release Notes

    Microsoft/TypeScript

    v4.4.2

    Compare Source

    For release notes, check out the release announcement.

    For the complete list of fixed issues, check out the

    Downloads are available on:


    Configuration

    📅 Schedule: "before 5am on monday" in timezone Asia/Kolkata.

    🚦 Automerge: Disabled due to failing status checks.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • Does not work with private Github repos

    Does not work with private Github repos

    when using private repos, it requires a username and password, when using .replit, it does not ask for this, but simply runs and exits, does not ask for input.

    GitHub also tells me this is a to be deprecated form of login

    "Basic authentication using a password to Git is deprecated and will soon no longer work. Visit https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information around suggested workarounds and removal dates."

  • Update all dependencies (major) (major)

    Update all dependencies (major) (major)

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | @​types/node-fetch | 2.5.12 -> 3.0.2 | age | adoption | passing | confidence | | node-fetch | 2.6.1 -> 3.0.0 | age | adoption | passing | confidence | | probot (source) | 11.4.1 -> 12.1.1 | age | adoption | passing | confidence |


    Release Notes

    node-fetch/node-fetch

    v3.0.0

    Compare Source

    version 3 is going out of a long beta period and switches to stable

    One major change is that it's now a ESM only package See changelog for more information about all the changes

    probot/probot

    v12.1.1

    Compare Source

    Bug Fixes

    v12.1.0

    Compare Source

    Features

    v12.0.0

    Compare Source

    Features
    BREAKING CHANGES
    • remove '*' event
    • app.webhooks.middleware has been removed in @octokit/webhooks v9
    • removes the webhookPath option on new Probot({}) for the webhooks middleware

    Co-authored-by: wolfy1339 [email protected]


    Configuration

    📅 Schedule: "after 1:00am and before 9:00am" in timezone Asia/Kolkata.

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

A simple Go app and GitHub workflow that shows how to use GitHub Actions to test, build and deploy a Go app to Docker Hub

go-pipeline-demo A repository containing a simple Go app and GitHub workflow that shows how to use GitHub Actions to test, build and deploy a Go app t

Nov 17, 2021
Small and easy server for web-hooks to deploy software on push from gitlab/github/hg and so on

Deployment mini-service This mini web-server is made to deploy your code without yaml-files headache. If you just need to update your code somewhere a

Dec 4, 2022
Go-github-actions - `go-github-actions` is a package for developing GitHub Actions

go-github-actions go-github-actions is a package for developing GitHub Actions.

Feb 6, 2022
Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications
Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.

Jan 5, 2023
Build and deploy Go applications on Kubernetes
Build and deploy Go applications on Kubernetes

ko: Easy Go Containers ko is a simple, fast container image builder for Go applications. It's ideal for use cases where your image contains a single G

Jan 5, 2023
A tool to build, deploy, and release any environment using System Containers.
A tool to build, deploy, and release any environment using System Containers.

Bravetools Bravetools is an end-to-end System Container management utility. Bravetools makes it easy to configure, build, and deploy reproducible envi

Dec 14, 2022
A tool to build, deploy, and release any application on any platform.
A tool to build, deploy, and release any application on any platform.

Waypoint Website: https://www.waypointproject.io Tutorials: HashiCorp Learn Forum: Discuss Waypoint allows developers to define their application buil

Dec 28, 2022
Triggers an update to a Koyeb app service to re-deploy the latest docker image

Triggers an update to a Koyeb app service to re-deploy the latest docker image

May 5, 2021
Easily deploy your Go applications with Dokku.

dokku-go-example Easily deploy your Go applications with Dokku. Features: Deploy on your own server Auto deployment HTTPS Check the full step by step

Aug 21, 2022
Flux is a tool for keeping Kubernetes clusters in sync with sources of configuration, and automating updates to configuration when there is new code to deploy.
Flux is a tool for keeping Kubernetes clusters in sync with sources of configuration, and automating updates to configuration when there is new code to deploy.

Flux is a tool for keeping Kubernetes clusters in sync with sources of configuration (like Git repositories), and automating updates to configuration when there is new code to deploy.

Jan 8, 2023
cloud native application deploy flow
cloud native application deploy flow

Triton-io/Triton English | 简体中文 Introduction Triton provides a cloud-native DeployFlow, which is safe, controllable, and policy-rich. For more introdu

May 28, 2022
A Go based deployment tool that allows the users to deploy the web application on the server using SSH information and pem file.

A Go based deployment tool that allows the users to deploy the web application on the server using SSH information and pem file. This application is intend for non tecnhincal users they can just open the GUI and given the server details just deploy.

Oct 16, 2021
Koyeb is a developer-friendly serverless platform to deploy apps globally.
Koyeb is a developer-friendly serverless platform to deploy apps globally.

Koyeb Serverless Platform Deploy a Go Gin application on Koyeb Learn more about Koyeb · Explore the documentation · Discover our tutorials About Koyeb

Nov 14, 2022
Deploy https certificates non-interactively to CDN services

certdeploy Deploy https certificates non-interactively to CDN services. Environment Variables CERT_PATH - Certificate file path, should contain certif

Nov 27, 2022
httpserver deploy in kubernetes

httpserver deploy in kubernetes cluster What is this? The project realizes the functions of mainstream httpserver based on golang / gin, including ele

Mar 15, 2022
Christmas Hack Day Project: Build an Kubernetes Operator to deploy Camunda Cloud services

Camunda Cloud Operator Christmas Hack Day Project (2021): Build an Kubernetes Operator to deploy Camunda Cloud services Motiviation / Idea We currentl

May 18, 2022
Deploy, manage, and secure applications and resources across multiple clusters using CloudFormation and Shipa

CloudFormation provider Deploy, secure, and manage applications across multiple clusters using CloudFormation and Shipa. Development environment setup

Feb 12, 2022
Digitalocean-kubernetes-challenge - Deploy a GitOps CI/CD implementation
Digitalocean-kubernetes-challenge - Deploy a GitOps CI/CD implementation

DigitalOcean Kubernetes Challenge 2021 I chose to participate in the DigitalOcean Kubernetes Challenge in order to learn more about Kubernetes and to

Nov 9, 2022
Deploy 2 golang aws lambda functions using serverless framework.

Deploy 2 golang aws lambda functions using serverless framework.

Jan 20, 2022