Snippets

github-actions

8 github-actions code snippets across 1 language. Copy-paste solutions from production code.

8

github actions

8 snippets

Cache npm Dependencies in GitHub Actions

Cache the npm store between GitHub Actions runs to cut install time from minutes to seconds. Lockfile-aware cache key included.

github-actionscachenpm+2
BEGINNERMay 16, 2026

Create a GitHub Release When a Version Tag is Pushed

A GitHub Actions workflow that creates a GitHub Release with auto-generated notes whenever a v* tag is pushed.

github-actionsreleasetag+2
INTERMEDIATEJun 13, 2026

GitHub Actions Matrix Build Across Node.js Versions

A matrix strategy that runs your test suite on multiple Node.js versions in parallel. Essential for libraries that support older Node releases.

github-actionsmatrixnodejs+2
INTERMEDIATEMay 4, 2026

Next.js CI Workflow with Lint, Typecheck, and Build

A clean GitHub Actions workflow for Next.js projects: install, lint, typecheck, build. Cached, fast, and PR-ready.

github-actionsnextjsci-cd+2
BEGINNERApr 12, 2026

Reusable GitHub Actions Workflow with workflow_call

Define a reusable Node.js setup workflow once and call it from any other workflow with workflow_call. Inputs, outputs, and secrets supported.

github-actionsworkflow-callreusable+2
INTERMEDIATEJun 5, 2026

Scheduled GitHub Actions Workflow Hitting a Secured Endpoint

A GitHub Actions cron that pings a bearer-auth endpoint every N minutes. Use it for scheduled revalidation, health checks, or webhooks.

github-actionscronschedule+2
INTERMEDIATEApr 24, 2026

Skip CI When Only Documentation Changed

Use a paths filter or dorny/paths-filter to skip GitHub Actions CI runs when a PR only touches Markdown or docs files.

github-actionspathsskip+2
BEGINNERJun 21, 2026

Sticky PR Preview Comment with github-script

Post or update a sticky comment on a pull request from GitHub Actions using actions/github-script. Perfect for preview links and build info.

github-actionspull-requestgithub-script+2
INTERMEDIATEMay 26, 2026