Skip to content

Commit

Permalink
chore: add PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nomyfan committed Apr 22, 2024
1 parent 43b2bbd commit 7c389c2
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,27 @@ jobs:
permissions:
contents: read
deployments: write
pull-requests: write

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Comment deploy start
if: github.event_name != 'push'
uses: mshick/add-pr-comment@v2
with:
message-id: cloudflare-deploy
message: |
### <span aria-hidden="true">🚧</span> Deploy Preview building...
| Name | Link |
|---------------------------------|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | ${{ github.sha }} |
|<span aria-hidden="true">🔍</span> Latest deploy log | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
---
- name: Setup rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand Down Expand Up @@ -59,10 +74,27 @@ jobs:

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
id: cloudflare-publish
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: gbplay
directory: dist
workingDirectory: app/gameboy
wranglerVersion: "3"

- name: Comment deploy url
uses: mshick/add-pr-comment@v2
with:
message-id: cloudflare-deploy
message: |
### <span aria-hidden="true">✅</span> Deploy Preview ready!
| Name | Link |
|---------------------------------|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | ${{ github.sha }} |
|<span aria-hidden="true">🔍</span> Latest deploy log | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
|<span aria-hidden="true">😎</span> Deploy Preview Url | [${{ steps.cloudflare.outputs.url }}](${{ steps.cloudflare.outputs.url }}) |
|<span aria-hidden="true">🌳</span> Environment | ${{ steps.cloudflare.outputs.environment }} |
---

0 comments on commit 7c389c2

Please sign in to comment.