Publishing static sites archives (React/Nextjs)?

In the end of the build of React or Next.js I have a static site (a directory with HTML/CSS/JS/fonts/jpeg files).

I want to “release” the site to Nexus repository.

I don’t understand package/repository format to choose. Should it be a ZIP archive uploaded to “raw” repository?

If the intent is to have Nexus serve the files as a website then you’d need to upload them individually into a raw repository with the expected directory structure.

Note however we do apply HTML CSP headers to content served which may affect the site’s functionality.

The intent is to have .zip file with all content inside so corporate scanners could check for vulnerabilities, and after confirmation the artifact is promoted from STAGE to PROD.

NPM package format requires some dance with package.json, directory layout, etc. The final product is a hostable site by Apache/NGinx/etc, not a JS lib… At the end of bureaucracy I’ll download and unpack the ZIP (or tgz??) into a folder.

That’s why I like “raw” repository format, but storing HTML/JS among .exe/.dll files is somewhat strange…

Nexus is a corporate standard for scans & promoting to PROD, I’m trying to figure out how other teams utilize Nexus.

I’m surprised that there are no info about storing site builds as artifacts. Probably people upload builds straight to WEB server from the pipes, avoiding artifact storage as intermediary. Or stuff files into OSI container images…

Perhaps I don’t understand your use case. My original impression is that you wanted Nexus to serve the contents of the zip like a web server.

You can definitely host a zip in a raw repository if you choose. Raw however does not have the notion of versions so those semantics would be adhoc and up to you. You could also use a Maven repository and follow the maven path structure which would provide you with groupId, artifactId and version.