Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk5 min

How to Schedule Website Screenshots with GitHub Actions

Schedule recurring website screenshots with GitHub Actions, Playwright, and downloadable workflow artifacts, with timezone and reliability guidance.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a GitHub Actions workflow with a schedule trigger, browser automation such as Playwright, and an artifact upload step. The schedule starts the job; your script opens the site and saves the image, and the artifact makes it available after the job ends.

What you need

  • A repository with a workflow file under .github/workflows/ on its default branch.
  • A script that can reach the target site, launch a browser, and write a screenshot to a known path.
  • Browser automation dependencies installed in the job. Playwright documents a CI setup that installs dependencies, runs browser automation, and uploads output as an artifact.

The workflow runs against the latest commit on the default branch, not whichever branch you happened to be viewing when you configured it. GitHub Docs: events that trigger workflows.

Create the scheduled workflow

Save this as .github/workflows/website-screenshot.yml. It defines a daily run at 06:17 UTC, a manual trigger for testing, and an artifact upload that retains the image for 30 days.

name: Website screenshot

on:
  schedule:
    - cron: '17 6 * * *'
  workflow_dispatch:

jobs:
  screenshot:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - uses: actions/setup-node@v6
        with:
          node-version: 22

      - name: Install Playwright
        run: |
          npm install --no-save playwright
          npx playwright install --with-deps chromium

      - name: Capture screenshot
        run: node screenshot.mjs
        env:
          TARGET_URL: https://example.com

      - uses: actions/upload-artifact@v5
        with:
          name: website-screenshot
          path: screenshot.png
          retention-days: 30

Action versions change over time; check the official action documentation and your repository’s policies before relying on a version pin. For a project that already has Node dependencies, prefer its lockfile and existing setup rather than installing packages ad hoc. Playwright’s CI guide shows the general checkout, runtime setup, browser installation, test/run, and artifact-upload pattern: Playwright continuous integration.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Write a screenshot script

Place the following in screenshot.mjs. It writes a predictable PNG path, sets the viewport, captures the full page, and exits unsuccessfully if navigation or capture fails.

import { chromium } from 'playwright';

const url = process.env.TARGET_URL;
if (!url) throw new Error('Set TARGET_URL to the page to capture.');

const browser = await chromium.launch({ headless: true });
try {
  const page = await browser.newPage({
    viewport: { width: 1440, height: 900 },
    deviceScaleFactor: 1,
  });
  const response = await page.goto(url, {
    waitUntil: 'networkidle',
    timeout: 60_000,
  });
  if (!response || !response.ok()) {
    throw new Error(`Navigation failed: ${response?.status() ?? 'no response'} ${url}`);
  }
  await page.screenshot({ path: 'screenshot.png', fullPage: true });
} finally {
  await browser.close();
}

networkidle may never occur on pages with continuous network activity. If that happens, use a more appropriate readiness condition such as domcontentloaded followed by a wait for a stable page selector. For sites that render content after interaction or lazy loading, explicitly wait for the relevant selector or scroll/load the content before taking the image. Keep the output filename aligned with the artifact path.

Rank #2
Free Fling File Transfer Software for Windows [PC Download]
  • Intuitive interface of a conventional FTP client
  • Easy and Reliable FTP Site Maintenance.
  • FTP Automation and Synchronization

Choose the schedule and timezone

GitHub Actions uses five-field POSIX cron syntax: minute, hour, day of month, month, and day of week. The example 17 6 * * * means 06:17 each day in UTC by default. The workflow syntax also supports an IANA timezone when configured; local-time schedules in daylight-saving regions need care because a skipped spring-forward time advances to the next valid time. See GitHub’s workflow syntax reference.

  • UTC: Choose it for a stable clock independent of seasonal timezone changes.
  • IANA timezone: Choose it when the capture should follow a local wall-clock schedule, and account for daylight-saving transitions.
  • Frequency: GitHub’s shortest supported schedule interval is five minutes. This is not a guarantee that a run starts exactly on time.
  • Avoid the top of the hour: GitHub warns that high load can delay scheduled events, particularly at the start of an hour; sufficiently high load can result in queued jobs being dropped. A minute such as 17 can reduce the chance of delay, not eliminate it.

For public repositories, GitHub automatically disables scheduled workflows after 60 days without repository activity. Confirm the current rules in GitHub’s schedule-event documentation.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run it and retrieve the screenshot

  1. Commit the workflow and script to the repository’s default branch. A scheduled workflow must exist on that branch.
  2. Open the repository’s Actions tab, select Website screenshot, and use Run workflow to test it manually.
  3. Open the run and inspect the Capture screenshot step. A successful job should produce screenshot.png.
  4. In the completed run, download the website-screenshot artifact. It remains available for the configured retention period, subject to GitHub’s applicable artifact policies.

Artifacts work well for run-by-run review. If you need a gallery or long-term visual history, choose a separate storage destination—such as object storage or a purpose-built monitoring service—and decide its access controls, retention, and cost. No single destination is best for every repository.

Troubleshooting

  • No scheduled run appears: Check that the workflow file is committed to the default branch and that its YAML and cron expression are valid. In a public repository, also check whether inactivity disabled the schedule.
  • The run started late or did not start: Scheduled events are not exact-time guarantees. Avoid scheduling at minute zero and check the Actions run history; GitHub notes that high load can delay or drop queued work.
  • Browser executable is missing: Ensure the Playwright package and matching browser binary are installed in the job. The example uses npx playwright install --with-deps chromium.
  • Navigation times out: Confirm the URL is reachable from the GitHub-hosted runner and adjust the timeout only if the page legitimately needs longer. Prefer waiting for the page state or selector you need rather than an arbitrary long sleep.
  • Screenshot is blank or incomplete: Wait for the page’s meaningful content, handle required navigation or consent steps where appropriate, and account for lazy-loaded sections. Check the screenshot dimensions and whether full-page capture is intended.
  • Artifact upload says no files were found: Make the script’s output path and the action’s path match exactly; ensure the capture step completed before upload.
  • Images differ between runs: Keep the browser version, viewport, device scale, target URL, and readiness condition stable. Dynamic ads, timestamps, personalized content, and animation can still change the result.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo provides a screenshot API and MCP server. A single GET request can capture a URL without installing a browser in your workflow:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for authentication and request options. Cookie banners and consent prompts, newsletter popups, and chat widgets are removed before capture; each cleanup step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server lets AI agents use screenshot, page-info, and PDF-capture tools. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. For scheduled captures, call the API from a GitHub Actions job and retain the returned file as an artifact just as you would a browser-generated image.

Sign up free for ScreenshotNeo to get 1,000 screenshots a month with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.