Giter VIP home page Giter VIP logo

screenshot-website's Introduction

๐Ÿ“ธ screenshot-website

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

Contents

Usage

- 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:

- 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.

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.

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

screenshot-website's People

Contributors

dependabot[bot] avatar jcfr avatar swinton avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.