From cd32d6e03e00952b39d2e7be8dcc019c4ac4be60 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Wed, 6 Nov 2024 17:45:28 +0100 Subject: [PATCH] chore: fix deployment output --- .github/workflows/shared/deploy-netlify/action.yml | 2 +- build/deploy-netlify.mjs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/shared/deploy-netlify/action.yml b/.github/workflows/shared/deploy-netlify/action.yml index c7ca8ec3..40462edb 100644 --- a/.github/workflows/shared/deploy-netlify/action.yml +++ b/.github/workflows/shared/deploy-netlify/action.yml @@ -40,4 +40,4 @@ runs: status: success env: ${{ steps.deployment.outputs.env }} deployment_id: ${{ steps.deployment.outputs.deployment_id }} - env_url: ${{ steps.netlify.deploy_url }} + env_url: ${{ steps.netlify.outputs.deploy_url }} diff --git a/build/deploy-netlify.mjs b/build/deploy-netlify.mjs index 296d3ed8..a05556b3 100644 --- a/build/deploy-netlify.mjs +++ b/build/deploy-netlify.mjs @@ -5,9 +5,8 @@ */ import { createHash } from 'crypto'; -import { createReadStream, existsSync } from 'fs'; +import { createReadStream, existsSync, writeFileSync } from 'fs'; import { readdir } from 'fs/promises'; -import { exec } from 'child_process'; import path from 'path'; import yargs from 'yargs'; import Queue from 'queue'; @@ -53,7 +52,7 @@ const MAX_RETRIES = 5; } if (process.env.CI) { - exec(`echo "deploy_url=${config.branch ? deploy.deploy_ssl_url : deploy.ssl_url}" >> $GITHUB_OUTPUT`); + writeFileSync(process.env.GITHUB_OUTPUT, `deploy_url=${config.branch ? deploy.deploy_ssl_url : deploy.ssl_url}`, 'utf-8'); } })();