From 891090a5f5958e8ef88bfa44522c4f4e83180676 Mon Sep 17 00:00:00 2001 From: Neill Robson Date: Thu, 6 Jun 2024 10:42:22 -0400 Subject: [PATCH] Another attempt at setting github output env var --- scripts/lookaside.mjs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/lookaside.mjs b/scripts/lookaside.mjs index d7f6422..28d78f7 100644 --- a/scripts/lookaside.mjs +++ b/scripts/lookaside.mjs @@ -1,6 +1,7 @@ import { Storage } from '@google-cloud/storage'; import path from 'node:path'; import fs from 'node:fs'; +import os from 'node:os'; import read from 'fs-readdir-recursive'; import minimist from 'minimist'; import logSymbols from 'log-symbols'; @@ -44,8 +45,12 @@ async function run() { }); await Promise.all(uploads); - console.log(logSymbols.success, 'Lookaside deployed'); - process.env.GITHUB_OUTPUT = `page_url=https://storage.googleapis.com/prism-design-system/${branch}/index.html`; + + const url = `https://storage.googleapis.com/prism-design-system/${branch}/index.html`; + const output = process.env['GITHUB_OUTPUT']; + + fs.appendFileSync(output, `page_url=${url}${os.EOL}`); + console.log(logSymbols.success, `Lookaside deployed at ${url}`); } catch (error) { console.log(logSymbols.error, error); process.exit(1);