Skip to content
paperclip

GitHub Action

Cloudflare Build Log

0.1.5 Latest version

Cloudflare Build Log

paperclip

Cloudflare Build Log

Get your Cloudflare Build Logs in your Repository Pull Requests

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Cloudflare Build Log

uses: JDeepD/cloudflare-build-log@0.1.5

Learn more about this action in JDeepD/cloudflare-build-log

Choose a version

cloudflare-build-log

Get your Cloudflare Build Logs in PRs.

Put this in your .github/workflows/action.yml

name: Fetch Deployment Logs

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  fetch-logs:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4

      - name: Poll for Cloudflare Pages Build and Fetch Logs
        uses: JDeepD/cloudflare-build-log@0.1.5
        with:
          CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
          PROJECT_NAME: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COMMIT_SHA: ${{ github.event.pull_request.head.sha }}

You need to put the following secrets in your repository:

SECRET NAME SECRET VALUE
CLOUDFLARE_PROJECT_NAME Your Cloudflare Project Name. Go to Cloudflare Dashboard > Workers and Pages > Overview.
CLOUDFLARE_API_TOKEN Generate a Cloudflare API Token (not API Key) if not generated already with Read Permissions on Pages. Make sure to set the expiration of the token properly.
CLOUDFLARE_ACCOUNT_ID You will find your Account ID on the Right Panel in Cloudflare Dashboard > Workers and Pages > Overview.