TouhouFest / touhoufest-webapp

custom tuning of cjnwebapp for touhoufest
https://schedule.touhoufest.org
GNU Affero General Public License v3.0
1 stars 0 forks source link

integrating automated events.csv building into github actions #61

Open kir12 opened 2 months ago

kir12 commented 2 months ago

In order to cut out the manual step of downloading events.csv from Google Sheets directly to the repo, James suggested that this process be automatically driven by having a GitHub Action export a copy of events.csv into into the build before it gets sent live. This issue will demonstrate the viability of automated rendering of events.csv, with the modification of replacing Google Sheets with a small SQLite database checked into the repository.

  1. Create a SQLite database file e.g. db.sqlite3 and store it somewhere on the local repository, make sure that it isn't directly added into the build output!
  2. Demonstrate exporting from the database file into an events.csv file -- following the same existing formatting rules that the manually downloaded events.csv file has -- and test to make sure it integrates properly into the schedule app. a. Whatever mechanism eventually is used for this exporting, make sure it can be used by GitHub Actions
  3. Set up a GitHub Action for rendering and injecting events.csv into the build folder for a development version a. Have the GitHub Action execute whenever new changes are pushed on any branch and on the newest pushed commit only b. Exclude the gh-pages branch since that's the deployment branch c. Set up a deployed development version of the website on a service that allows different versions of a webpage per each branch (e.g. netlify?) d. James may have a better option for pre-production builds, use that if there is one
  4. Set up another GitHub Action for rendering and injecting events.csv for the production version on GitHub Pages a. Optionally, hijack npm run deploy to do this locally before gh-pages makes its push if the GitHub Action exhibits problems

Pre-requesites:

kir12 commented 3 weeks ago

new dependency #66