File tree Expand file tree Collapse file tree 2 files changed +22
-13
lines changed Expand file tree Collapse file tree 2 files changed +22
-13
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
6564 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
6665 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
6766
68- - name : Post Preview Link to PR
69- uses : actions/github-script@v7
70- with :
71- github-token : ${{secrets.GITHUB_TOKEN}}
72- script : |
73- github.rest.issues.createComment({
74- owner: context.repo.owner,
75- 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})`
78- });
79-
8067 invalidate-cache :
8168 needs : build-and-deploy-preview
8269 runs-on : ubuntu-latest
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+ - name : Post Preview Link to PR
13+ uses : actions/github-script@v7
14+ with :
15+ github-token : ${{secrets.GITHUB_TOKEN}}
16+ script : |
17+ github.rest.issues.createComment({
18+ issue_number: context.issue.number,
19+ owner: context.repo.owner,
20+ repo: context.repo.repo,
21+ body: `🎉 A preview of this PR is available at: ${{ env.HUGO_BASEURL }} `
22+ })
You can’t perform that action at this time.
0 commit comments