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 deployment to GitHub pages #27

Merged
merged 12 commits into from Mar 27, 2022
Merged

Add deployment to GitHub pages #27

merged 12 commits into from Mar 27, 2022

Conversation

lauravuo
Copy link
Contributor

@lauravuo lauravuo commented Mar 25, 2022

Purpose

  • Add deployment to GitHub pages with custom domain almanakka.kaupunginnaiset.fi (triggers on each push to main)
  • Needed to remove the use of next/image to enable static export. It there appears a need for image optimisations later, let's reconsider the deployment model (or write custom optimiser).
  • Added a simple smoke test for the exported files via nginx-container. We could execute e2e-tests before deployment against this container once they are ready.
  • Created a local action for setting up node according to @magdapoppins nvm idea, so that we don't have to duplicate the steps in each job.

Related Issues

Closes #18

How to test

Check that CI-workflow succeeds. After merging, check that app is visible at https://almanakka.kaupunginnaiset.fi

@codecov
Copy link

codecov bot commented Mar 25, 2022

Codecov Report

Merging #27 (4c67ef1) into main (ddfa841) will decrease coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
- Coverage   97.82%   97.77%   -0.05%     
==========================================
  Files           7        7              
  Lines          46       45       -1     
  Branches       11       11              
==========================================
- Hits           45       44       -1     
  Partials        1        1              
Impacted Files Coverage Δ
components/pages/Homepage/EventCard.tsx 95.45% <ø> (-0.20%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4db970...4c67ef1. Read the comment docs.

@lauravuo lauravuo marked this pull request as ready for review March 25, 2022 20:04
Copy link
Collaborator

@eevajonnapanula eevajonnapanula 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 and I can see the deployed page 🚀

Comment on lines +80 to +84
{/* TODO:
We skip next/image for now to be able to export fully static build.
If image optimization is needed, we can think of alternative deployment solutions.
*/}
<img src="https://picsum.photos/200" alt="" width={200} height={200} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Removing the Next's Image breaks the layout, as it added some extra things to the DOM and styling, in addition to the img-tag. I can fix this later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, good catch and sounds like a plan 🤝

@@ -0,0 +1 @@
almanakka.kaupunginnaiset.fi
Copy link
Collaborator

Choose a reason for hiding this comment

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

🚀

@lauravuo lauravuo merged commit 56ff7c8 into main Mar 27, 2022
@lauravuo lauravuo deleted the add-deployment branch March 27, 2022 16:12
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

Successfully merging this pull request may close these issues.

Add deployment to GitHub Pages
2 participants