https://supabase.com/ logo
#help
Title
# help
s

skyclo

06/04/2022, 9:34 PM
👋 Hey. I have a question about Supabase Buckets. Is there a way that I can sync a folder/object under a bucket via git? If not, would a GitHub Action triggered by pushes using the Supabase CLI be a viable option? Thanks for all the help in advance.
n

Needle

06/04/2022, 9:34 PM
Hello @skyclo! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
🆕 Syncing Storage Buckets via Git
o

Olyno

06/06/2022, 2:04 PM
Hi It seems you can't sync a bucket via git. But indeed, you can pushes changes using any sdks. I'm not sure if you can do it using the CLI tho 🤔 @skyclo
n

Needle

06/06/2022, 2:04 PM
Syncing Storage Buckets via Git
s

skyclo

06/06/2022, 3:55 PM
Hmm... interesting. I'll look into it thanks!
I'll keep this thread open for now in case I find any new info
Using GitHub actions, I was able to use the Supabase JavaScript package to sync the directory (more specifically, certain directories for my use purpose). It's actually easier than I thought. Here's the script if anyone in the future needs it (https://github.com/ideoxan/courses/blob/main/sync.js). Of course it would have to be modified slightly for your use case, but the basic concept is still there. The keys can be exposed via GH's Action env directive in the YAML file (see https://docs.github.com/en/actions/learn-github-actions/environment-variables).
Thanks for the help supabase team!
n

Needle

06/06/2022, 7:24 PM
Thread was archived by @skyclo. Anyone can send a message to unarchive it.