From 99a21fa654e93661f1fe63942ad7c96c08ea0a0f Mon Sep 17 00:00:00 2001
From: Bartek Wrona <wrona@syncad.com>
Date: Tue, 3 Sep 2024 23:51:36 +0200
Subject: [PATCH] Fixed bug in npm_push_doc_template leading to wrong
 generation of gen_doc.env artifact

---
 templates/npm_projects.gitlab-ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/templates/npm_projects.gitlab-ci.yml b/templates/npm_projects.gitlab-ci.yml
index f7956dc..5132e5e 100644
--- a/templates/npm_projects.gitlab-ci.yml
+++ b/templates/npm_projects.gitlab-ci.yml
@@ -166,6 +166,8 @@ variables:
     DIST_DIR: "$CI_PROJECT_DIR/dist"
 
   script:
+    # start always at project root dir, to make sure .env file (included in artifacts) is generated there
+    - cd "${CI_PROJECT_DIR}"
     - /home/emscripten/scripts/npm_push_doc.sh "${SOURCE_DIR}" "${PROJECT_URL}" "${WIKI_PUSH_TOKEN}" "${DIST_DIR}" "${CI_COMMIT_REF_NAME}" "${CI_COMMIT_REF_PROTECTED}"
 
   artifacts:
-- 
GitLab