shabados / actions

Cross-repository utilities repository
MIT License
0 stars 4 forks source link

Use vercel for snapshot / pr previews? #6

Open bhajneet opened 4 years ago

bhajneet commented 4 years ago

Something like this: https://shabad-os-theme-tool-3m9jkes5d.now.sh/

From: https://vercel.com/

saihaj commented 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

Harjot1Singh commented 4 years ago

Main constraint is being able to deploy multiple branches. Vercel is great, shame it's only frontend. Would work for us though.

saihaj commented 4 years ago

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

saihaj commented 4 years ago

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.

Harjot1Singh commented 4 years ago

https://devcenter.heroku.com/articles/github-integration-review-apps

Harjot1Singh commented 3 years ago

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.

Harjot1Singh commented 3 years ago

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.

Harjot1Singh commented 3 years ago

There is also an option to use Pull Dog!