render-status-badge
v1.0.1
Published
[](https://www.npmjs.com/package/render-status-badge) [](https://github.com/nia-cloud-official/render
Maintainers
Readme
Render Status Badge 🛠️🟢
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.
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
.envconfig. - 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-badgeUsage 🚀
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-badge3. Add to README.md
Paste the generated URL into your markdown:
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 -->.*|)|" README.md
git commit -am "Update Render status badge" && git pushConfiguration ⚙️
| Environment Variable | Required | Description |
|-----------------------|----------|--------------------------------------|
| RENDER_API_KEY | Yes | Render API key (get it here) |
| RENDER_SERVICE_ID | Yes | Your Render service ID |
Contributing 🤝
Contributions are welcome! Here’s how:
- Report Issues: Open a GitHub issue for bugs or feature requests.
- Suggest Features: Propose improvements via Discussions.
- 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
