Giter Site home page Giter Site logo

git-glitched's Introduction

Git Glitched

Deploy to Glitch with a single git push.

Setup

  • Fork the Git Glitched GitHub repo.
  • Copy the URL of your forked repo. You'll need it in a second.
  • Create a new Glitch project based on your forked repo:
    • In the top left corner of Glitch, click your project name.
    • Click New Project โœจ.
    • Click Clone from Git Repo.
    • When Glitch asks what Git repo you want to clone from, enter the URL of your forked repo. (That's the one you copied a second ago.)
  • In your newly created Glitch project, go to the .env.example file and follow the directions there for setting your SECRET environment variable.
  • Open the Glitch console. As I'm writing this, you can do that by clicking Tools in the bottom left corner of Glitch, then clicking Full Page Console โ†’.
  • In the console that opens, generate a new ssh key.
  • When you're generating your SSH key, you'll be asked where you want to save it. You can go with the default location, but remember the file it's saved to. If you're not sure where it saved, it's probably in ~/.ssh/id_rsa.pub or /app/.ssh/id_rsa.pub.
  • Use the cat command to print out your newly-generated public key, then copy it. You'll need it for the next step.
  • Set up that public key as a deploy key for your forked GitHub repo.
  • In your forked repo, set up a webhook to POST to {your-project-name}.glitch.me/deploy?secret={your-secret}.
    • The Payload URL should be {your-project-name}.glitch.me/deploy?secret={your-secret}.
    • Make sure {your-secret} matches the SECRET environment variable you set earlier in your Glitch project.
    • Change the Content type to application/json.
    • You don't need to set the Secret field. That's a different, unrelated secret.
  • Clone your forked repo to your computer.
  • Change into the local copy of your repo that you just cloned.
  • Create a git branch called glitch.

Now when you push to the glitch branch of your repo, it will automatically get deployed to Glitch ๐ŸŽ‰

โ˜ ๏ธ Be careful. This project only checks if the secret query param matches the SECRET environment variable. It will happily pull down any git repository, including ones that don't belong to you.

Made by Thomas Bailey

\ ใ‚œoใ‚œ)ใƒŽ

git-glitched's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.