Skip to content

Commit

Permalink
When publishing a website, add a comment to PR with the CloudFLare pa…
Browse files Browse the repository at this point in the history
…ges URL

Change-type: patch
  • Loading branch information
drskullster committed Apr 15, 2024
1 parent 7b29b99 commit a70a422
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions flowzone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2787,13 +2787,31 @@ jobs:
echo "CF_BRANCH=${{ github.event.repository.default_branch }}" >> "${GITHUB_ENV}"
- name: Deploy to Cloudflare Pages
id: deploy_cf_pages
uses: cloudflare/wrangler-action@7c01cc48d88a1f83b4716e0557c168854a9dcdb8 # v3.4.1
with:
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

- name: Find 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: Pages deployed to

- name: Create or update comment
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.find_cf_comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Pages deployed to ${{ steps.deploy_cf_pages.outputs.deployment-url }}
edit-mode: replace

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

0 comments on commit a70a422

Please sign in to comment.