Skip to content

Feature request: Create directory if not existing

It would be very helpful if publishing to a directory that doesn't exist at deploy time would be feasible.

Use case: Update documentation for a new version, based on a tag where the tag (e.g. directly using ${CI_COMMIT_TAG}) is part of the desired directory name.

In the example, the desired value for DFS_WEBSITE_DIR is:

  variables:
    DFS_WEBSITE_NAME: my_project
    DFS_WEBSITE_DIR: ${CI_PROJECT_NAME}/${CI_COMMIT_TAG}

The above example works in case of no tag (${CI_COMMIT_TAG} is not set (and a webspace my_project/${CI_PROJECT_NAME} is set up), but fails with

cd \Websites\m\my_project\my_git_repo\my_tag\: NT_STATUS_OBJECT_NAME_NOT_FOUND

when the tag is set.

Edited by Steffen Staerz