Skip to content

Commit

Permalink
Another attempt at setting github output env var
Browse files Browse the repository at this point in the history
  • Loading branch information
neillrobson committed Jun 6, 2024
1 parent e9b48f3 commit 891090a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/lookaside.mjs
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 891090a

Please sign in to comment.