Skip to content

Commit 7a62042

Browse files
authored
Merge branch 'main' into add-speakers-page
2 parents 9e2e93d + 074fc61 commit 7a62042

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,27 @@ jobs:
3131
JEKYLL_ENV: production
3232

3333
- name: Publish
34-
uses: cloudflare/pages-action@v1
34+
id: cloudflare
35+
uses: cloudflare/pages-action@v1.5.0
3536
with:
3637
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3738
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
3839
projectName: ruby-uy
3940
directory: _site
40-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
4141
wranglerVersion: '3'
4242
branch: ${{ github.event.pull_request.head.ref || github.ref_name }}
43+
44+
- name: Comment preview URL on PR
45+
if: github.event_name == 'pull_request_target'
46+
uses: actions/github-script@v7
47+
with:
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
script: |
50+
github.rest.issues.createComment({
51+
issue_number: context.issue.number,
52+
owner: context.repo.owner,
53+
repo: context.repo.repo,
54+
body: `🔍 Preview: ${process.env.DEPLOY_URL}`
55+
})
56+
env:
57+
DEPLOY_URL: ${{ steps.cloudflare.outputs.url }}

0 commit comments

Comments
 (0)