Skip to content

Get your Cloudflare Deployment Logs straight in your Previews.

License

Notifications You must be signed in to change notification settings

JDeepD/cloudflare-build-log

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

Get your Cloudflare Deployment Logs straight in your Previews.

Resources

License

Stars

Watchers

Forks

Packages

No packages published