EbookFoundation / free-programming-books-search

https://ebookfoundation.github.io/free-programming-books-search
BSD 2-Clause "Simplified" License
313 stars 53 forks source link

[FEATURE-36] Create CI/CD pipeline with build-deploy steps #36

Open davorpa opened 2 years ago

davorpa commented 2 years ago

What does this PR do?

Add feature(s) | Fix

Description

It is well known in any React project that after any modification in its source code (src/**.js, package.json mainly), it is necessary to deploy to production (executing npm run deploy) if we want to see said changes at https://ebookfoundation.github.io/free-programming-books-search

Well, this pipeline/workflow automates this process as part of a continuous integration cycle (lint-build-test-deploy) by:

Due to build the artifact in a CI environment I've needed to fix some lint warnings in several *.js files. ⚠️ Pipeline fails if not resolved. See: https://github.com/davorpa/free-programming-books-search/actions/runs/3057895260/jobs/4933516460#step:5:14

Context

Resolves #35

~The lint-test phases are TODOs because the project requires a refactor to format it according to Prettier/ESLint or current testscases don't pass!!~ ~The test phases/jobs are faked. If enabled, it didn't work per-sé. Ssee failed runs:~

~Unfortunatelly I don't know how to fix the integration of create-react-app + jest + babel to work with ES modules. So are conditionally disabled and annotated as TODOs~

davorpa commented 2 years ago

Testing jobs has been fixed in bae6a0132a10f6432be52eb1473796296b368d8f

PR ready to review :rocket: