{"id":17001618,"url":"https://github.com/shresht7/web-screenshot-action","last_synced_at":"2026-02-02T20:41:43.265Z","repository":{"id":37934819,"uuid":"466687510","full_name":"Shresht7/web-screenshot-action","owner":"Shresht7","description":"GitHub Action to take a screenshots of a website 📷","archived":false,"fork":false,"pushed_at":"2024-12-01T11:31:29.000Z","size":9254,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-18T04:47:24.982Z","etag":null,"topics":["github-actions","puppeteer","screenshot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shresht7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-06T09:10:18.000Z","updated_at":"2024-09-29T09:29:13.000Z","dependencies_parsed_at":"2024-10-28T14:21:33.712Z","dependency_job_id":null,"html_url":"https://github.com/Shresht7/web-screenshot-action","commit_stats":{"total_commits":176,"total_committers":4,"mean_commits":44.0,"dds":0.3522727272727273,"last_synced_commit":"2655cfe727ae3f6f9c153e624bcfdc6c5c89ddc0"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Shresht7/web-screenshot-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fweb-screenshot-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fweb-screenshot-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fweb-screenshot-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fweb-screenshot-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shresht7","download_url":"https://codeload.github.com/Shresht7/web-screenshot-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Fweb-screenshot-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264503950,"owners_count":23618762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","puppeteer","screenshot"],"created_at":"2024-10-14T04:25:34.171Z","updated_at":"2026-02-02T20:41:43.231Z","avatar_url":"https://github.com/Shresht7.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- ===================== --\u003e\n\u003c!-- WEB SCREENSHOT ACTION --\u003e\n\u003c!-- ===================== --\u003e\n\n\u003ch1 align='center'\u003e\n  📷 Web Screenshot Action 📷\n\u003c/h1\u003e\n\n\u003c!-- REPOSITORY BADGES --\u003e\n\u003c!-- ================= --\u003e\n\n\u003cdiv align='center'\u003e\n\n[![Release](https://img.shields.io/github/v/release/Shresht7/web-screenshot-action?style=for-the-badge)](https://github.com/Shresht7/web-screenshot-action/releases)\n[![License](https://img.shields.io/github/license/Shresht7/web-screenshot-action?style=for-the-badge)](./LICENSE)\n\n\u003c/div\u003e\n\n\u003c!-- DESCRIPTION --\u003e\n\u003c!-- =========== --\u003e\n\n\u003cp align='center'\u003e\n  \u003c!-- slot: description --\u003e\nCapture screenshots of a website 📷\n\u003c!-- /slot --\u003e\n\u003c/p\u003e\n\n\u003c!-- WORKFLOW BADGES --\u003e\n\u003c!-- =============== --\u003e\n\n\u003cdiv align='center'\u003e\n\n[![Test](https://github.com/Shresht7/web-screenshot-action/actions/workflows/test.yml/badge.svg)](https://github.com/Shresht7/web-screenshot-action/actions/workflows/test.yml)\n[![Validate](https://github.com/Shresht7/web-screenshot-action/actions/workflows/validate.yml/badge.svg)](https://github.com/Shresht7/web-screenshot-action/actions/workflows/validate.yml)\n[![Action Readme](https://github.com/Shresht7/web-screenshot-action/actions/workflows/action-readme.yml/badge.svg)](https://github.com/Shresht7/web-screenshot-action/actions/workflows/action-readme.yml)\n[![Screenshot](https://github.com/Shresht7/web-screenshot-action/actions/workflows/screenshot.yml/badge.svg)](https://github.com/Shresht7/web-screenshot-action/actions/workflows/screenshot.yml)\n\n\u003c/div\u003e\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003c!-- ================= --\u003e\n\n\u003cdetails\u003e\n\n\u003csummary align='center'\u003eTable of Contents\u003c/summary\u003e\n\n- [📖 Usage](#-usage)\n- [📋 Inputs](#-inputs)\n- [📋 Outputs](#-outputs)\n- [📄 Workflow Example](#-workflow-example)\n- [📑 License](#-license)\n\n\u003c/details\u003e\n\n---\n\n![Example-Screenshot](./screenshot.png)\n\n\u003c!-- USAGE --\u003e\n\u003c!-- ===== --\u003e\n\n## 📖 Usage\n\nUse this action in a workflow step and provide the URL you want to take the screenshot of.\n\n```yaml\n- name: Take Screenshot\n  uses: Shresht7/web-screenshot-action@v1\n  with:\n    url: https://github.com/Shresht7/web-screenshot-action\n```\n\nThe screenshot will be saved as `screenshot.png`. The file-path and type can be changed using [input parameters](#-inputs).\n\nif `shouldCreateArtifacts` is set to `true`, an [artifact](https://help.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts) will be created with the generated screenshots.\n\nIntended to be used as a sub-task in some other workflow, this action's only job is to generate the screenshots. What you do with them is up to you. See [example workflow](#-workflow-example).\n\n---\n\n## 📋 Inputs\n\n\u003c!-- slot: inputs --\u003e\n| Input                   | Description                                                            |          Default | Required |\n| :---------------------- | :--------------------------------------------------------------------- | ---------------: | :------: |\n| `url`                   | URL to take the screenshot of                                          |      `undefined` |     ✅    |\n| `path`                  | Save screenshot as                                                     | `screenshot.png` |          |\n| `width`                 | Viewport width                                                         |           `1920` |          |\n| `height`                | Viewport height                                                        |           `1080` |          |\n| `captureFullPage`       | Take screenshot of the entire page                                     |          `false` |          |\n| `captureBeyondViewport` | Capture beyond the viewport constraints                                |          `false` |          |\n| `omitBackground`        | Omit the background allowing for transparent images                    |          `false` |          |\n| `encoding`              | Output screenshot encoding. (`base64` / `binary` / `undefined`)        |      `undefined` |          |\n| `shouldCreateArtifacts` | Generate screenshot artifacts                                          |          `false` |          |\n| `delay`                 | Wait for duration (in milliseconds) before taking a screenshot         |           `1000` |          |\n| `darkMode`              | Enable dark mode by setting `prefers-color-scheme: dark` media feature |          `false` |          |\n\u003c!-- /slot --\u003e\n\n## 📋 Outputs\n\nif `shouldCreateArtifacts` is set to `true`, an [artifact](https://help.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts) will be created with the screenshots.\n\n\u003c!-- slot: outputs --\u003e\n\n\u003c!-- /slot --\u003e\n\n## 📄 Workflow Example\n\nThe [screenshot](#-web-screenshot-action) in this README is auto-generated using this action!\n\n[`.github/workflows/screenshot.yml`](./.github/workflows/screenshot.yml):\n\n[![Screenshot](https://github.com/Shresht7/web-screenshot-action/actions/workflows/screenshot.yml/badge.svg)](https://github.com/Shresht7/web-screenshot-action/actions/workflows/screenshot.yml)\n\n\n\u003c!-- WORKFLOW EXAMPLE --\u003e\n\u003c!-- ================ --\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\n  click here to show the workflow\n\u003c/summary\u003e\n\n\u003cbr /\u003e\n\n\u003c!-- slot: example,       prepend: ```yaml, append: ``` --\u003e\n```yaml\n# ============================\n#         SCREENSHOT\n# ----------------------------\n# Take screenshot of a website\n# ============================\n\nname: Screenshot\n\n# Activation Events\n# =================\n\non:\n  workflow_dispatch: # When a workflow event is dispatched manually\n\n# Jobs\n# ====\n\njobs:\n  screenshot:\n    runs-on: ubuntu-latest\n\n    name: Screenshot\n    steps:\n      # Actions/Checkout ✅\n      # ===================\n\n      # Required for GITHUB_WORKSPACE\n      - name: Checkout\n        uses: actions/checkout@v3\n\n      # Take Screenshots 📷\n      # ===================\n\n      - name: Screenshot\n        uses: Shresht7/web-screenshot-action@v1\n        id: screenshot\n        with:\n          url: https://www.github.com/Shresht7/web-screenshot-action\n          path: screenshot.png\n\n      - name: Screenshot-Light\n        uses: Shresht7/web-screenshot-action@v1\n        id: screenshot-light\n        with:\n          url: https://www.github.com/Shresht7/web-screenshot-action\n          path: screenshots/screenshot-light.png\n\n      - name: Screenshot-Dark\n        uses: Shresht7/web-screenshot-action@v1\n        id: screenshot-dark\n        with:\n          url: https://www.github.com/Shresht7/web-screenshot-action\n          path: screenshots/screenshot-dark.png\n          darkMode: true\n\n      # Push to Main 🌐\n      # ===============\n\n      # Check if there are any changes in the current-working-directory\n      - name: check for changes\n        id: git-diff\n        run: |\n          if git diff --exit-code; then\n          echo \"::set-output name=changes_exist::false\"\n          else\n          echo \"::set-output name=changes_exist::true\"\n          fi\n\n      - name: add, commit and push\n        if: ${{ steps.git-diff.outputs.changes_exist == 'true' }}\n        run: |\n          git config user.name 'github-actions[bot]'\n          git config user.email 'github-actions[bot]@users.noreply.github.com'\n          git add .\n          git commit -m 'Update screenshot 📷'\n          git push\n\n```\n\u003c!-- /slot --\u003e\n\n\u003c/details\u003e\n\n---\n\n\u003c!-- LICENSE --\u003e\n\u003c!-- ======= --\u003e\n\n## 📑 License\n\n\u003e [MIT License](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fweb-screenshot-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshresht7%2Fweb-screenshot-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Fweb-screenshot-action/lists"}