Pipery npm CD#

Reusable GitHub Action for npm/Node.js CD — download package or image, deploy, and verify — with structured logging via Pipery.

GitHub Marketplace Version License: MIT

Usage#

name: CD
on:
  push:
    branches: [main]

jobs:
  cd:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pipery-dev/pipery-npm-cd@v1
        with:
          package_name: my-app
          package_version: latest
          deploy_target: cloud-run
          cloud_run_service: my-service
          cloud_run_region: us-central1

Pipeline steps#

StepDescriptionSkip input
Downloadnpm pack or docker pull the package/imageskip_download
DeployDeploy via ArgoCD, Cloud Run, Helm, or Ansibleskip_deploy
Status checkVerify deployment healthskip_status_check

Inputs#

NameDefaultDescription
package_name``npm package name to download.
package_versionlatestnpm package version.
image_name``Docker image to pull (alternative to npm package).
image_taglatestDocker image tag.
project_path.Path to the project source tree.
config_file.pipery/config.yamlPath to Pipery config file.
deploy_targetargocdDeployment target: argocd, cloud-run, helm, or ansible.
deploy_strategyrollingDeployment strategy: rolling, blue-green, or canary.
argocd_server``ArgoCD server URL.
argocd_app``ArgoCD application name.
argocd_token``ArgoCD authentication token.
cloud_run_service``Cloud Run service name.
cloud_run_regionus-central1Cloud Run region.
cloud_run_image``Container image to deploy to Cloud Run.
helm_release``Helm release name.
helm_chart``Helm chart path or reference.
helm_namespacedefaultKubernetes namespace.
ansible_playbook``Path to Ansible playbook.
ansible_inventory``Path to Ansible inventory.
log_filepipery.jsonlPath to the JSONL structured log file.
skip_downloadfalseSkip the download step.
skip_deployfalseSkip the deploy step.
skip_status_checkfalseSkip the post-deploy status check.

About Pipery#

Pipery is an open-source CI/CD observability platform. Every step script runs under psh (Pipery Shell), which intercepts all commands and emits structured JSONL events — giving you full visibility into your pipeline without any manual instrumentation.

Development#

# Run the action locally against test-project/
pipery-actions test --repo .

# Regenerate docs
pipery-actions docs --repo .

# Dry-run release
pipery-actions release --repo . --dry-run