Open bhajneet opened 4 years ago
It is also possible using gh-pages
if we don't want to go on some third-party platform. Check out this PR and they are trying to implement using gh-actions https://github.com/primer/components/pull/820
Main constraint is being able to deploy multiple branches. Vercel is great, shame it's only frontend. Would work for us though.
If we can use vm’s then we can setup a dockerized preview https://nebulab.it/blog/preview-your-prs-with-docker/ then we can do frontend and backend
Vercel is great, shame it's only frontend. Would work for us though.
We can deploy backend too if we make it work serverless. Something like https://www.prisma.io for db connection. Other option can be if we get our api out and add support in desktop.
Did some in-depth reading. Adapting this looks like a solid bet: https://okteto.com/docs/tutorials/preview-environments/index.html.
I'm tempted to suggest setting up a k8s.preview.yml
in each repository we want a preview for, with the definitions for running the preview.
Once the action is run. it'd produce a url like: https://${{ github.event.repository.name }}-[${{ github.event.number }}].preview.shabados.com
.
And delete whatever has been spun up on the close pull request event.
Should we be able to download existing k8s configs and replace some values (in a pre-action to this)?
E.g. Viewer has a manifest already, and we'd be duplicating it entirely with a preview, but presenter does not.
Perhaps it's better to just duplicate it for now, since we only have 1 case of this currently.
There is also an option to use Pull Dog
!
Something like this: https://shabad-os-theme-tool-3m9jkes5d.now.sh/
From: https://vercel.com/