Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

screenshot-website

> 开发工具
Open source

:camera_flash: A GitHub Action to capture screenshots of a website, across Windows, Mac, and Linux

199 stars0 likes0 views
WebsiteGitHub

About

:camera_flash: A GitHub Action to capture screenshots of a website, across Windows, Mac, and Linux

:camera_flash: screenshot-website

A GitHub Action to capture screenshots of a website, across Windows, Mac, and Linux

Contents

  • Usage
  • Inputs
  • Outputs
  • Advanced Usage
  • Credits

Usage

yaml
- name: Screenshot Website
  uses: swinton/[email protected]
  with:
    source: https://github.com/swinton/screenshot-website
    destination: screenshot.png

Inputs

Required inputs

  1. source: Source of the content to be captured, may be a URL or HTML string, e.g. https://example.com/
  2. destination: Destination filename the captured website will be written to, defaults to screenshot.png

Optional inputs

Most of the options listed here (inputType, width, height, etc.) can be passed as inputs, just pass in a kebab-cased equivalent, e.g. full-page for fullPage:

yaml
- name: Screenshot Website
  uses: swinton/[email protected]
  with:
    source: https://github.com/swinton/screenshot-website
    destination: screenshot.png
    full-page: true

Outputs

An artifact will be created automatically for each screenshot captured. The following additional outputs are also supported:

  1. path: The filesystem path to the captured screenshot

Advanced Usage

Use a matrix to capture screenshots across different operating systems, e.g.

yaml
jobs:
  screenshot:
    name: Screenshot
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}

    steps:

    - name: Screenshot Website
      uses: swinton/[email protected]
      with:
        source: https://github.com/swinton/screenshot-website
        destination: screenshot-${{ matrix.os }}.png

Combine a matrix with additional options such as width, e.g.

yaml
jobs:
  screenshot:
    name: Screenshot
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        width: [1200, 992, 768, 600]
    runs-on: ${{ matrix.os }}

    steps:

    - name: Screenshot Website
      uses: swinton/[email protected]
      with:
        source: https://github.com/swinton/screenshot-website
        destination: screenshot-${{ matrix.os }}-${{ matrix.width }}.png
        width: ${{ matrix.width }}

Credits

  • :bow: https://github.com/sindresorhus/capture-website

Issues· 21 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptactionsgithub-actionsscreenshotwebsite

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具