We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d66e6a5 commit 646ac2dCopy full SHA for 646ac2d
.github/workflows/azure-static-web-apps-polite-cliff-0173aa90f.yml
@@ -35,6 +35,23 @@ jobs:
35
output_location: "dist"
36
app_build_command: "yarn build:docs"
37
38
+ - name: Add preview url to PR
39
+ if: github.event_name == 'pull_request'
40
+ uses: actions/github-scripts@7
41
+ with:
42
+ script: |
43
+ const deployUrl = process.env.SWA_URL || (core.getOutput('deployment-url'));
44
+ if (!deployUrl) return;
45
+ const comment = `PR preview deployed at: ${deployUrl}`;
46
+ github.rest.issues.createComment({
47
+ issue_number: context.issue.number,
48
+ owner: context.repo.owner,
49
+ repo: context.repo.repo,
50
+ body: comment
51
+ })
52
+ env:
53
+ SWA_URL: ${{ steps.swa.outputs.static_web_app_url }}
54
+
55
close_pull_request_job:
56
if: github.event.action == 'closed'
57
runs-on: ubuntu-latest
0 commit comments