Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Custom Deno Web Service For Publishing Static Sites to Multiple Backends #12

Open
zicklag opened this issue May 6, 2023 · 3 comments
Milestone

Comments

@zicklag
Copy link
Collaborator

zicklag commented May 6, 2023

As I was looking into the GitHub pages integration, I found that the Web Flow for logging in with GitHub requires a server-side component to be secure by default. ( See Discussion. )

We can work around this by using the device flow for logging into GitHub, where our app will display an 8 digit code that the user must type into a GitHub login page to authorize the app. That's not too bad, but it started me thinking whether we might run into something similar in other backends, that we might not have an easy workaround for.

Since we are already required to communicate with hosted online services, if we are dpeloying to them, I was thinking that it wouldn't be a hurt to the user-experience or offline-first solution to have a Deno app that we run on Deno deploy that is in charge of actually publishing to public cloud backends such as GitHub Pages, Netlify, and Cloudflare.

The idea is that this app, let's call it EasyPages, is the simplest possible interface to create a new website for our supported backends, where all you do is upload a zip file of the website that you want to deploy, and it will take care of the rest.

When using the Weird app locally, you would have the option to export the site to a local zip file, or deploy the site using EasyPages, and it would open up an EasyPages window that would walk you through the rest of the process, except that the Weird app would save you from having to save the zip separately and then upload through the UI, because it already has the zip ready and can send it to EasyPages for you.


I'm thinking of trying out a POC for the GitHub pages deployment using Fresh, and I don't think it'd take long to see how well it'd work. Let me know if you think this would be a good or bad direction!

@erlend-sh
Copy link
Contributor

erlend-sh commented May 7, 2023

Sounds like the sort of idea we wanna be pursuing 👍

Does Fresh provide any important utilities that SvelteKit (which has a Deno adapter) doesn’t in this case?

Deviations from our core stack makes collaboration and maintenance harder, so I’d like to avoid additional frameworks unless they unlock very particular superpowers. Also worth noting that Fresh has not received any major updates since last year, so I’m unsure if they’re going to put more resources into it.

@zicklag
Copy link
Collaborator Author

zicklag commented May 7, 2023

The motivation for fresh was the zero configuration and no compile step, and because I wanted to try it out and get something up quickly, but it really doesn't provide any extra advantage. SveltKit would be just as appropriate.

I'll do a quick update of what I have so far to SveltKit. 👍

@zicklag
Copy link
Collaborator Author

zicklag commented May 8, 2023

I still have to re-implement the GitHub login logic with Svelte, but I migrated to Sveltkit: https://easy-pages.deno.dev/

@erlend-sh erlend-sh transferred this issue from muni-town/weird-legacy Feb 21, 2024
@erlend-sh erlend-sh added this to the v1.0 milestone Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants