1.0.1 β€’ Published 3 months ago

render-status-badge v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

Render Status Badge πŸ› οΈπŸŸ’

npm version GitHub License Render Status

A dynamic status badge generator for Render.com deployments. Automatically displays your service's deploy status (Live, Failed, Deploying) in your README or docs using Shields.io and Render's API.

Example Badges Example Badges Example Badges

Features ✨

  • Real-time Status: Automatically updates based on Render's deploy status.
  • Customizable: Supports Shields.io styles (flat, plastic, etc.).
  • Multi-Project Ready: Use across multiple repos/services via .env config.
  • CI/CD Integration: Built-in GitHub Actions workflow for auto-updates.
  • Open Source: MIT licensed β€” modify and distribute freely!

Installation πŸ“¦

npm install render-status-badge
# or
yarn add render-status-badge

Usage πŸš€

1. Configure Environment Variables

Create a .env file in your project root:

RENDER_API_KEY="your_render_api_key_here"
RENDER_SERVICE_ID="your_service_id_here"

2. Generate the Badge URL

Run the script to get your dynamic badge URL:

npx render-status-badge
# Output: https://img.shields.io/badge/Render-Live-brightgreen?logo=render&style=for-the-badge

3. Add to README.md

Paste the generated URL into your markdown:

![Render Status](YOUR_BADGE_URL_HERE)

GitHub Actions Automation πŸ€–

Add this workflow (.github/workflows/update-badge.yml) to auto-update your badge:

name: Update Render Status Badge
on:
  schedule:
    - cron: '*/5 * * * *' # Runs every 5 minutes
  workflow_dispatch:

jobs:
  update-badge:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Generate Badge
        env:
          RENDER_API_KEY: ${{ secrets.RENDER_API_KEY }}
          RENDER_SERVICE_ID: ${{ secrets.RENDER_SERVICE_ID }}
        run: npx render-status-badge >> badge-url.txt
      - name: Update README
        run: |
          sed -i "s|<!-- RENDER_BADGE -->.*|![Render Status]($(cat badge-url.txt))|" README.md
          git commit -am "Update Render status badge" && git push

Configuration βš™οΈ

Environment VariableRequiredDescription
RENDER_API_KEYYesRender API key (get it here)
RENDER_SERVICE_IDYesYour Render service ID

Contributing 🀝

Contributions are welcome! Here’s how: 1. Report Issues: Open a GitHub issue for bugs or feature requests. 2. Suggest Features: Propose improvements via Discussions. 3. Submit PRs: Fork the repo, create a branch, and open a PR.

License πŸ“„

MIT License β€” see LICENSE for details.


Made by Milton Vafana
Credits to Render and Shields.io