File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 2323 with :
2424 submodules : true
2525 lfs : false
26- - name : Build And Deploy
26+ - name : Build And deokiy to Azure Static Web Apps
2727 id : builddeploy
2828 uses : Azure/static-web-apps-deploy@v1
2929 with :
3535 output_location : " dist"
3636 app_build_command : " yarn build:docs"
3737
38+ - name : Add preview url to PR
39+ if : github.event_name == 'pull_request'
40+ uses : actions/github-script@v7
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+
3855 close_pull_request_job :
3956 if : github.event.action == 'closed'
4057 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments