@@ -18,7 +18,6 @@ const SOURCE_PATH = Deno.env.get("SOURCE_ASSET_PATH");
1818const DEFAULT_TRACKING_BRANCH = Deno . env . get ( "DECO_TRACKING_BRANCH" ) ?? "main" ;
1919const REPO_URL = Deno . env . get ( "DECO_REPO_URL" ) ;
2020const GITHUB_APP_KEY = Deno . env . get ( "GITHUB_APP_KEY" ) ;
21- const BUILD_FILES_DIR = Deno . env . get ( "BUILD_FILES_DIR" ) ;
2221const ADMIN_DOMAIN = "https://admin.deco.cx" ;
2322
2423export const lockerGitAPI = createLocker ( ) ;
@@ -531,16 +530,13 @@ export const ensureGit = async ({ site }: Pick<Options, "site">) => {
531530 . submoduleInit ( )
532531 . submoduleUpdate ( [ "--depth" , "1" ] ) ;
533532
534- // Copy build files if BUILD_FILES_DIR is specified
535- if ( BUILD_FILES_DIR ) {
536- const copyBuildFiles = new Deno . Command ( "cp" , {
537- args : [ "-r" , BUILD_FILES_DIR + "/." , "." ] ,
538- } ) ;
533+ const copyBuildFiles = new Deno . Command ( "cp" , {
534+ args : [ "-r" , Deno . env . get ( "HOME" ) + "/build-files/.npmrc" , "." ] ,
535+ } ) ;
539536
540- const copy = await copyBuildFiles . output ( ) ;
541- console . log ( "stdout" , new TextDecoder ( ) . decode ( copy . stdout ) ) ;
542- console . log ( "stderr" , new TextDecoder ( ) . decode ( copy . stderr ) ) ;
543- }
537+ const copy = await copyBuildFiles . output ( ) ;
538+ console . log ( "stdout" , new TextDecoder ( ) . decode ( copy . stdout ) ) ;
539+ console . log ( "stderr" , new TextDecoder ( ) . decode ( copy . stderr ) ) ;
544540 } ;
545541
546542 await assertNoIndexLock ( ) ;
0 commit comments