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

Add documentation for build previews with GHA and Netlify #166

Merged
merged 9 commits into from
Oct 21, 2021

Conversation

andersy005
Copy link
Member

@andersy005 andersy005 commented Sep 23, 2021

Towards ProjectPythia/pythia-foundations#85. This PR is related to #167

@andersy005 andersy005 requested a review from a team as a code owner September 23, 2021 21:31
@andersy005 andersy005 requested review from kmpaul and jukent and removed request for a team September 23, 2021 21:31
@jukent
Copy link
Contributor

jukent commented Sep 23, 2021

This reads well but I have not actually tried to follow the steps. I won't have time to do that until next Monday.

Thanks for putting this together @andersy005 !

@github-actions
Copy link
Contributor

github-actions bot commented Sep 26, 2021

This pull request is being automatically built with GitHub Actions and Netlify. To see the status of your deployment, click below.

🔍 Git commit SHA: 52bac9a
✅ Deployment Preview URL: https://616902a18664ff598ecc608a--projectpythia-org.netlify.app

@andersy005
Copy link
Member Author

This pull request is being automatically built with GitHub Actions and Netlify. To see the status of your deployment, click below.

🔍 Git commit SHA: 7523c1a
✅ Deployment Preview URL: 6150e5c66db04c0ad302d500--projectpythia-org.netlify.app

The new GitHub Actions + Netlify workflow is working :).

  1. We should update the contributing guide to reflect this change.
  2. Readthedocs builds can be disabled.

Copy link
Member

@brian-rose brian-rose left a comment

Choose a reason for hiding this comment

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

Looks good! A few notes:

  • Under "Step 3: Update site settings", I think screenshot 2 out of 3 ought to have a red box around the "Edit settings" button for clarity and consistency
  • The example script with the deploy_site workflow is a little bit inconsistent with the actual deploy_site workflow in this repository (projectpythia.github.io/.github/workflows/ci.yaml). The filename is different and some of the details are different.
  • Similarly, the example preview_site script is inconsistent with the projectpythia.github.io/.github/workflows/preview.yaml. I think we just need to add the extra if statements that came with Preview PRs via Netlify + GitHub Actions #167
  • In "Step 6: Create GitHub Action secrets", can we just clarify that NETLIFY_SITE_ID in the GitHub action is the same thing as API ID in the Netlify site settings.

@jbusecke
Copy link

jbusecke commented Oct 3, 2021

Hey everyone.
First of all thanks a lot for adding these super helpful instructions. I have tried to implement them in a test project here, but keep getting an error that I honestly am not sure how to deal with: Apparently my API_ID has a problem: is not a legal HTTP header value. Could this be because there is absolutely no content on it yet? Do you need to upload a first version manually?

@jbusecke
Copy link

jbusecke commented Oct 3, 2021

~~Quick update: I was indeed able to fix my problem by reactivating the build process and creating a site. I assume there is a better way to do this from the command line though? Maybe just upload a dummy file, so that something is 'there'. ~~
EDIT: This actually did not work (netlify was still building by itself). Does anyone have a hunch of what could be going wrong there?

@andersy005
Copy link
Member Author

EDIT: This actually did not work (netlify was still building by itself). Does anyone have a hunch of what could be going wrong there?

@jbusecke, can you confirm that the auto builds are deactivated here

Screen Shot 2021-10-04 at 8 28 44 AM

@jbusecke
Copy link

jbusecke commented Oct 4, 2021

Yep. I turned them off.

@andersy005
Copy link
Member Author

Okay... My next hunch is that when you added your Netlify credentials as GitHub Secrets, you may have inadvertently added a newline at the end of your keys and this ends up messing the HTTP headers during the connection to the Netlify. Can you reset those and re-trigger your GitHub workflow to see if the issue goes away?

@jbusecke
Copy link

jbusecke commented Oct 4, 2021

So I did that, but it also seems as if an older PR (yesterday night) built successfully. I wonder if this was a slip up on the netlify side? Thanks so much for this great tutorial!

@andersy005
Copy link
Member Author

I wonder if this was a slip up on the netlify side? Thanks so much for this great tutorial!

I was about to mention this :) (Just saw logs from your latest, successful builds). Yeah, it's likely a glitch

Copy link
Collaborator

@kmpaul kmpaul left a comment

Choose a reason for hiding this comment

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

One typo that I could find. I haven't verified that this works, but the text looks good.

Deployment-docs/README.md Outdated Show resolved Hide resolved
@kmpaul kmpaul added the infrastructure Infrastructure related issue label Oct 7, 2021
@andersy005
Copy link
Member Author

@kmpaul & @brian-rose, I addressed your comments/feedback. Let me know if I missed anything...

Copy link
Collaborator

@kmpaul kmpaul left a comment

Choose a reason for hiding this comment

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

Thanks, @andersy005!

@brian-rose brian-rose merged commit cdeea99 into ProjectPythia:main Oct 21, 2021
@jbusecke
Copy link

😍

@andersy005 andersy005 deleted the use-netlify-for-preview branch October 25, 2021 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Infrastructure related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants