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

chore: Add Partykit as part of the deployment. #10

Closed
nickytonline opened this issue Dec 31, 2023 · 3 comments · Fixed by #12
Closed

chore: Add Partykit as part of the deployment. #10

nickytonline opened this issue Dec 31, 2023 · 3 comments · Fixed by #12
Assignees
Labels

Comments

@nickytonline
Copy link
Owner

nickytonline commented Dec 31, 2023

  1. Run npx partykit@latest token generate to generate a token.
  2. Run ntl env:set PARTYKIT_LOGIN nickytonline to add it to the environment variables for Netlify deploys.
  3. Run ntl env:set PARTYKIT_TOKEN THE_GENERATED_SUPER_SECRET_TOKEN to add it to the environment variables for Netlify deploys.
  4. Run ntl env:set PUBLIC_PARTYKIT_HOST https://astro-partykit-starter-party.nickytonline.partykit.dev so that the production URL for Partykit is available for the deployment.
  5. Need to run partykit deploy as part of the deployment.

"build": "astro check && astro build",

-  "build": "astro check && astro build",
+  "build": "astro check && astro build && partykit deploy",
  1. Update the code for getting the Partykit URL to the following in
    const host = import.meta.env.PUBLIC_PARTYKIT_HOST ?? "localhost:1999";
- const host = import.meta.env.PUBLIC_PARTYKIT_HOST ?? "localhost:1999";
+ const isProd = import.meta.env.PROD;
+ const host = isProd ? import.meta.env.PUBLIC_PARTYKIT_HOST : "localhost:1999";
@nickytonline nickytonline self-assigned this Dec 31, 2023
Copy link

Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.

To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take".

For full info on how to contribute, please check out our contributors guide.

@nickytonline
Copy link
Owner Author

nickytonline commented Dec 31, 2023

I've already done steps 1-4 as they are environment variables for continuous integration/continuous deployment (CI/CD) on Netlify that don't involve code changes.

I'll get to steps 5 and 6 in the next few days (post snowboarding) unless @adiati98, you'd like to make those changes. If so, feel free to assign yourself and unassign me.

@adiati98
Copy link
Collaborator

adiati98 commented Dec 31, 2023

Taking it over, @nickytonline. 👍

Adding myself as an assignee and leave yours as is.😉

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