/filebin-api

Filebin API

Primary LanguageJavaScriptMIT LicenseMIT

Glitch Github Sync

Introduction

The main ideia of this project is develop your Glitch project using your prefered development tools (code editor, plugins, etc) with a code versioning (git).

How it works

The sync works in both ways, but the default is Github -> Glitch.

Sync Github -> Glitch

Just make a git push to Github repository. The Glitch repository will be updated automaticaly.

Sync Glitch -> Github

Export your Glitch repository to Github. This will add a new glitch branch on your Github repository. Then, merge glitch branch to master.

Instructions

  1. Copy this repo

    Fork this repository and clone the forked repository to local machine.

  2. New Glitch project

    Create new Glitch project based on forked github repo url.

    New Glitch Project

  3. Setup .env file

    On Glitch project, create a .env file with the following keys: GITHUB_URL and GITHUB_SECRET. To generate your GITHUB_SECRET you can use a tool like this.

    Setup .env file

  4. Setup Webhook

    On Github forked repo settings, create a new webhook.

    Create Webhook

    And congfigure the Payload URL to point to https://<YOUR_GLITCH_PROJECT>.glitch.me/git, change the Content Type to application/json and use the same value of GITHUB_SECRET of .env file in Secret field.

    Setup Webhook

  5. All done

    Now, on your local repo, make a change in code and push to github. The glitch project will be updated automatically.

Working sample

Sample

Click on the image or here to see the video in better quality and normal speed.