carpentries / curriculum-development

The Curriculum Development Handbook. How to assemble and maintain a Carpentries lesson.
https://cdh.carpentries.org
Other
23 stars 18 forks source link

deploy broken #75

Closed zkamvar closed 2 years ago

zkamvar commented 2 years ago

The netlify deploy is broken because there are vulnerabilities installed when we try to install the netlify-cli tool from npm.

I am too tired to mess with this now and we might be better off just committing directly to gh-pages until this resolves itself.

tobyhodges commented 2 years ago

@zkamvar I do not understand the process sufficiently so could use your insight: is this likely to get fixed without our intervention? I.e. should we just wait? Or is there something I can try to do to address the problem from our side?

zkamvar commented 2 years ago

This needs intervention in order to fix and I think the intervention is to do the following:

  1. remove the npm steps
  2. re-implement 02b0886892a4d00369c91e016bbbd71fdacbc9e7
  3. set up netlify to build from the gh-pages branch.

The workflow is failing on the step where we attempt to install netlify-cli from npm:

https://github.com/carpentries/curriculum-development/blob/e9de0ad1b161ba6199656bb3e67d20e0c0e46987/.github/workflows/bookdown.yaml#L67-L74

It gives the following response, which is weird since its working on npm and we don't have a package lockfile: https://www.npmjs.com/package/netlify-cli

npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated statsd-client@0.4.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3[14](https://github.com/carpentries/curriculum-development/runs/8066971242?check_suite_focus=true#step:14:15)2
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

added 1986 packages, and audited 1987 packages in 30s

[15](https://github.com/carpentries/curriculum-development/runs/8066971242?check_suite_focus=true#step:14:16)3 packages are looking for funding
  run `npm fund` for details

[18](https://github.com/carpentries/curriculum-development/runs/8066971242?check_suite_focus=true#step:14:19) vulnerabilities (11 moderate, 7 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
still waiting on run dependencies:
dependency: wasm-instantiate
(end of list)
Deploy path: /home/runner/work/curriculum-development/curriculum-development/_book
Deploying to main site URL...
 ›   Warning: JSONHTTPError:  [40](https://github.com/carpentries/curriculum-development/runs/8066971242?check_suite_focus=true#step:14:41)1
 ›   Warning: 
{
  "name": "JSONHTTPError",
  "status": 401,
  "json": {
    "code": 401,
    "message": "Access Denied"
  }
}
zkamvar commented 2 years ago

It turns out that the deploy was broken because there was something not right about our netlify credentials. Instead of poking around to try and figure out why they weren't working, I've gone ahead and enabled gh pages.