Public
GitHubSync
Viewing readonly version: 146View latest version
Webhook to commit vals to GitHub and sync code from GitHub back to Val Town
This example val is synced to this GitHub repo
- Fork this val
- Edit
config.json
to point to the repo and vals you plan to sync - Create a new repo on GitHub to sync to
- 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
- 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.
- 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
Script
HTTP
Script