g0v / vaccinate

vaxx.tw is a tool to find COVID-19 Vaccine Appointments near you
http://vaxx.tw
MIT License
33 stars 20 forks source link

Host frontend assets on GitHub Pages. #79

Closed yorkxin closed 3 years ago

yorkxin commented 3 years ago

This patch introduces a build pipeline that hosts frontend assets on GitHub Pages.

In order to do that, I've done these:

  1. Changed Parcel build URL so that it points to relative URL, instead of root URL. (Important if we don't have a custom domain)
    • we may use vaxx.tw custom domain and move API to api.vaxx.tw for the next step, but that requires further migration, so let's run it on g0v.tw/vaccinate first.
  2. Added CORS rules to backend.
    • Currently allowing ANY origin * to access GET, HEAD and OPTIONS.

What I didn't change by intention:

To @kevinjcliao :

It seems that gh-pages branch already exists. If you merge this branch, all files in that branch will be replaced by Parcel build. If there is any file that is being accessed somewhere else, please let me know, I'll come up with a solution.

Closes #67

Screen Shot 2021-05-25 at 20 10 47
yorkxin commented 3 years ago

@kevinjcliao Thanks for your prompting review. I finally make type checkers happy. Please review :)

kevinjcliao commented 3 years ago

Thank you for your hard work on this!

yorkxin commented 3 years ago

@kevinjcliao Likewise! Please let me know if you need help on the api.vaxx.tw thing I mentioned in the description.