Skip to content

build: avoid /docs/api and /docs/doc/api upload

Rodrigo Muino Tomonari requested to merge github/fork/rvagg/docs-rsync into master

Fixes problem of having /docs/api and /docs/doc/api directories in our distributions, caused by a double (or more) build on CI server prior to promotion as reported and discussed in https://github.com/nodejs/node/issues/12833.

scp -pr out/doc/ server:.../docs/ first sees a missing /docs/ directory so puts the out/doc/ contents into /docs/, second pass it sees an existing directory so makes a new /docs/doc/ directory for the upload.

This fix ensures the directory exists initially and then does an scp of the contents of the out/doc/ directory rather than the directory itself.

Needs to be backported to all active release lines once confirmed working.

Merge request reports

Loading