Skip to content

Commit

Permalink
patch: Add Cloudflare Pages link as PR comment
Browse files Browse the repository at this point in the history
Signed-off-by: Vipul Gupta (@vipulgupta2048) <[email protected]>
  • Loading branch information
vipulgupta2048 committed Jul 11, 2024
1 parent 6314b50 commit 1f219fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/flowzone.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions flowzone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3289,17 +3289,14 @@ jobs:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
wranglerVersion: "3.5.1" # latest - https://www.npmjs.com/package/wrangler
command: --version
postCommands: npx wrangler pages deploy --branch ${{ env.CF_BRANCH }} --project-name=${{ inputs.cloudflare_website }} build/ | tee -a $GITHUB_STEP_SUMMARY
command: pages deploy --branch ${{ env.CF_BRANCH }} --project-name=${{ inputs.cloudflare_website }} build/

- name: Find Cloudflare Pages link comment
uses: peter-evans/find-comment@v3
id: find_cf_comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'flowzone-app[bot]'
body-includes: Website deployed to CF Pages, 👀 preview link
token: ${{ steps.gh_app_token.outputs.token || secrets.FLOWZONE_TOKEN }}

- name: Create or update Cloudflare Pages link comment
uses: peter-evans/create-or-update-comment@v4
Expand All @@ -3309,8 +3306,9 @@ jobs:
issue-number: ${{ github.event.pull_request.number }}
body: |
Website deployed to CF Pages, 👀 preview link ${{ steps.deploy_cf_pages.outputs.deployment-url }}
# body: checking if I can even comment
edit-mode: replace
token: ${{ steps.gh_app_token.outputs.token || secrets.FLOWZONE_TOKEN }}
# token: ${{ steps.gh_app_token.outputs.token || secrets.FLOWZONE_TOKEN }}

###################################################
# GitHub
Expand Down

0 comments on commit 1f219fb

Please sign in to comment.