Skip to content

aitaskorchestra/grabshot-screenshot-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GrabShot Screenshot Action

Capture website screenshots in your GitHub Actions workflow using GrabShot -- a fast, reliable screenshot API.

Usage

- name: Capture screenshot
  uses: aitaskorchestra/grabshot-screenshot-action@v1
  with:
    url: 'https://example.com'
    api-key: ${{ secrets.GRABSHOT_API_KEY }}
    output: 'screenshots/homepage.png'

Get Your API Key

  1. Sign up at grabshot.dev (free tier: 25 screenshots/month)
  2. Copy your API key from the dashboard
  3. Add it as a repository secret (GRABSHOT_API_KEY)

Inputs

Input Description Required Default
url URL to screenshot Yes -
api-key GrabShot API key Yes -
output Output file path No screenshot.png
width Viewport width No 1280
height Viewport height No 800
format Image format (png/jpeg/webp) No png
full-page Capture full page No false
delay Delay before capture (ms) No 0

Outputs

Output Description
file Path to the screenshot file
size File size in bytes

Examples

Visual regression testing

name: Visual Check
on: [pull_request]

jobs:
  screenshot:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Screenshot staging
        uses: aitaskorchestra/grabshot-screenshot-action@v1
        with:
          url: 'https://staging.myapp.com'
          api-key: ${{ secrets.GRABSHOT_API_KEY }}
          output: 'screenshots/staging.png'
          full-page: 'true'
      
      - name: Upload screenshot
        uses: actions/upload-artifact@v4
        with:
          name: screenshots
          path: screenshots/

Scheduled monitoring

name: Site Monitor
on:
  schedule:
    - cron: '0 */6 * * *'

jobs:
  monitor:
    runs-on: ubuntu-latest
    steps:
      - name: Check site
        uses: aitaskorchestra/grabshot-screenshot-action@v1
        with:
          url: 'https://myapp.com'
          api-key: ${{ secrets.GRABSHOT_API_KEY }}
          output: 'check.png'

License

MIT

About

GitHub Action to capture website screenshots using GrabShot API

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors