redditXFL / xfl_bot

The brains of u/XFL_Bot
1 stars 0 forks source link

Automated CSS Builds from Github #6

Open xDuck opened 4 years ago

xDuck commented 4 years ago
  1. Commit to master hook
  2. Build server clones repo @ Master
  3. Build CSS (Sass compile?)
  4. Push to reddit
nbmason14 commented 4 years ago

Looks like this is somewhat easy to do with PRAW, we need to designate a folder for all the images to live in though so we can automate image uploading

Once we do that we can connect to the sub, upload all the images, maybe create an entire stylesheet 'object' (maybe a huge CSS string?), then update the CSS

The part I'm not sure about is how to trigger it upon upload to Github, I think we'd have to manually trigger it unless there's a github api constantly checking for updates?

xDuck commented 4 years ago

A usual workflow is that you have a folder in your frontend called 'dist' or something similar that when you build, all the final elements end up in there properly. That way you can change all the rest of the directory structure at will

As far as github triggers, they have webhooks you can use that when an action happens it will make a request to your bot with the corresponding info, I can help with that