diff --git a/action.yml b/action.yml index 7057f8d..5288fa7 100644 --- a/action.yml +++ b/action.yml @@ -27,6 +27,11 @@ inputs: clone-certificate: description: Forge SSL certificate ID to clone to the preview site. required: false +outputs: + site-url: + description: 'The URL of the site that was deployed.' + site-id: + description: 'The Forge ID of the site that was created.' runs: using: node20 main: dist/index.js diff --git a/src/action.ts b/src/action.ts index c0d0af5..f5f9552 100644 --- a/src/action.ts +++ b/src/action.ts @@ -87,7 +87,7 @@ export async function createPreview({ core.info('Waiting for SSL certificate to be activated.'); await site.ensureCertificateActivated(); - return { url: `https://${site.name}` }; + return { url: `https://${site.name}`, id: site.id }; } export async function destroyPreview({ diff --git a/src/main.ts b/src/main.ts index bf915ce..9581b5c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -94,6 +94,9 @@ export async function run() { }); if (preview) { + core.setOutput('site-url', preview.url); + core.setOutput('site-id', preview.id); + const octokit = github.getOctokit(githubToken); octokit.rest.issues.createComment({ owner: pr.repository.owner.login,