FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
project logo

jxnblk

GitHubSync

Sync vals to GitHub and back
Public
Like
1
GitHubSync
Home
Code
6
routes
5
README.md
commit-files
config.json
H
index
sign-webhook
Branches
1
Pull requests
Remixes
7
History
Environment variables
4
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
2/7/2025
Viewing readonly version of main branch: v149
View latest version
README.md

GitHubSync

Webhook to commit vals to GitHub and sync code from GitHub back to Val Town

Demo

This example val is synced to this GitHub repo

How to set up

  1. Fork this val
  2. Edit config.json to point to the repo and vals you plan to sync
  3. Create a new repo on GitHub to sync to
  4. Add a webhook to your repo that points to this val's /deploy route, e.g. https://username-<ID>.web.val.run/deploy
    • Create a secret for your webhook
    • In this val's Environment Variables, add that secret
  5. On GitHub, create a new personal access token
    • Ensure the token has read/write access to Contents for the repo
    • Copy the access token and add that as the GITHUB_TOKEN env var in this val

This is the next version of https://www.val.town/v/jxnblk/gitHubSync

Note: This will currently only work with non-project vals until the SDK supports projects.

TODO

  • Basic webhook handler w/ secrets
  • GitHub commit util
  • Val Town SDK to write vals
  • Make private val to call sync to GitHub webhook
  • auth middleware for export and deploy routes
  • Add env vars
  • Set up test vals
  • Monkey test
  • Add setup instructions to readme
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.