File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ name: Deploy preview for PR
33on :
44 pull_request :
55 types : [opened, synchronize, reopened]
6- # branches: [main]
76 # Allow manual runs from the Actions tab
87 workflow_dispatch :
98
7372 github.rest.issues.createComment({
7473 owner: context.repo.owner,
7574 repo: context.repo.repo,
76- issue_number: context.payload.pull_request .number,
77- body: `🎉 A preview of this PR is available at: [${process. env.HUGO_BASEURL} ](${process. env.HUGO_BASEURL})`
75+ issue_number: context.issue .number,
76+ body: `🎉 A preview of this PR is available at: [${{ env.HUGO_BASEURL }} ](${{ env.HUGO_BASEURL } })`
7877 });
7978
8079 invalidate-cache :
Original file line number Diff line number Diff line change 1+ on :
2+ # Trigger the workflow on push or pull request
3+ pull_request :
4+ types : [opened, synchronize, reopened]
5+
6+ jobs :
7+ comment :
8+ runs-on : ubuntu-latest
9+ env :
10+ HUGO_BASEURL : " https://preview-developer.espressif.com/pr${{ github.event.pull_request.number }}/"
11+ steps :
12+ - uses : actions/github-script@v7
13+ with :
14+ github-token : ${{secrets.GITHUB_TOKEN}}
15+ script : |
16+ github.rest.issues.createComment({
17+ issue_number: context.issue.number,
18+ owner: context.repo.owner,
19+ repo: context.repo.repo,
20+ body: '👋 Test comment in PR${{ github.event.pull_request.number }} in ${{ env.HUGO_BASEURL }}!'
21+ })
You can’t perform that action at this time.
0 commit comments