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

feat: support Google Cloud in adapter-auto #12015

Merged
merged 8 commits into from
Mar 27, 2024

Conversation

LukeSchlangen
Copy link
Contributor

This Pull Request supports zero-config deployments to Google Cloud Run and resolves #11951

After this change is merged (assuming npm and gcloud CLIs are installed), it should only require these three commands to create and deploy a SvelteKit application to Google Cloud Run:

  1. npm create svelte@latest sveltekit-app
  2. cd sveltekit-app
  3. gcloud run deploy --allow-unauthenticated

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check
    • I couldn't find any tests related to deployment environment variables. I'm happy to add one if they exist for other environments.

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

Copy link

changeset-bot bot commented Mar 22, 2024

🦋 Changeset detected

Latest commit: bc2bc17

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-auto Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@LukeSchlangen
Copy link
Contributor Author

@ghostdevv - Thank you so much for the approval. This is my first PR to Svelte, so I wanted to see if there's anything else I need to do to merge this PR?

No rush, I just want to make sure I haven't missed anything. (This was my first time using Changeset Bot, so I'm not sure I got everything right.)

@geoffrich
Copy link
Member

@LukeSchlangen there shouldn't be anything else needed from you at the moment. We'll want to get another approval on this and then hopefully should be good to merge or address feedback.

@LukeSchlangen
Copy link
Contributor Author

Sounds great. Thanks so much for your help!

Copy link
Member

@geoffrich geoffrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Followed the instructions on a fresh SvelteKit app and confirmed this works without additional configuration - all I did was manually install the Node adapter (which adapter-auto will handle after this PR). Thanks!

@geoffrich
Copy link
Member

Requesting reviews from a couple other maintainers who have reviewed similar PRs in the past just to make sure no one has any objections, but I think this is good to merge.

@benmccann benmccann merged commit e934685 into sveltejs:main Mar 27, 2024
10 of 12 checks passed
@github-actions github-actions bot mentioned this pull request Mar 27, 2024
@LukeSchlangen
Copy link
Contributor Author

Thank you all so much!

No rush on my end, but for transparency, I did test these commands and they don't work yet:

  1. npm init svelte@latest sveltekit-app
  2. cd sveltekit-app
  3. gcloud run deploy --allow-unauthenticated

I still get the error: Could not detect a supported production environment. See https://kit.svelte.dev/docs/adapters to learn how to configure your app to run on the platform of your choosing, but I'm guessing that won't be ready until the next release since it seems to pull from 6.0.10 which was last week?

As long as that sounds right to you, I think we're in great shape!

@ghostdevv
Copy link
Member

@LukeSchlangen It'll be released when #12042 is merged!

@LukeSchlangen
Copy link
Contributor Author

Fantastic. That's very exciting.

Thanks for all your help!

@benmccann
Copy link
Member

Released

@LukeSchlangen
Copy link
Contributor Author

Confirmed deployment working on Google Cloud Run!
https://sveltekit-app-ywmavwferq-uc.a.run.app/

Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow Google Cloud Run Deployment by adding adapter-node to adapter-auto
5 participants