Deployment React App using Space CI/CD

Hi! I'm running some issues trying to deploy a web app using Spaces.

As far as I know, after the job is completed everything is removed from the container, the question is:

- There is any way to keep/store the result of "npm run build" in a folder of the server running the automation process?
The only thing I was able to achieve was to store it on Space Cloud as a zip file.

This is the job I got:

job("Deploy React App"){
    startOn {
        gitPush {
            enabled = true
        shellScript {
            content = """
                npm cache clean --force
                npm install --force
                npm run build

        fileArtifacts {
            localPath = "build"
            remotePath = ""
            archive = true



David hi!

Could you please elaborate more on the goal that is behind storing the files on the server? Also, could you please let me know if you are using Space Cloud workers or self-hosted ones for your automation process?



Sorry, totally missed the message.

The goal of storing them on the server is basically to keep the build folder of my reactApp, and then point nginx to that folder, something like what I'm currently doing with GitHub actions.
I'm using self-hosted workers

Hello David,

Since you are using a self-hosted worker, you can install the nodejs on the worker itself and use the 'host' step (instead of 'container'). In the host step, you will be able to copy the files anywhere outside the worker's step dir and they will stay as static:


Please sign in to leave a comment.