Home > Software engineering >  Why do GitHub workflow badges not render on Jekyll GitHub pages?
Why do GitHub workflow badges not render on Jekyll GitHub pages?

Time:09-06

My GitHub Pages site is built from the master branch, using my README.md. The top of my read-me file is directly below.

![pytest](https://github.com/preritdas/wooster-trading-systems/actions/workflows/pytest.yml/badge.svg)
![coverage-badge](tests/badge.svg)
![version](https://img.shields.io/badge/python-3.10-blue)
![maintenance-status](https://img.shields.io/badge/maintenance-actively--developed-brightgreen.svg)
![firebase](https://github.com/preritdas/wooster-trading-systems/actions/workflows/firebase-hosting-merge.yml/badge.svg)
![pages-build-deployment](https://github.com/preritdas/wooster-trading-systems/actions/workflows/pages/pages-build-deployment/badge.svg)


# :chart_with_upwards_trend: :robot: Wooster Systems :moneybag: :money_with_wings:

This looks just fine in the read-me inside the repository. Image below.

enter image description here

Unfortunately, the workflow status badges don't populate on the Jekyll GitHub Pages site. Specifically, the badges that come directly from GitHub don't show, but the rest do. The ones that don't show are tests, firebase deployment, and pages-build-deployment. A screenshot from the site is below.

enter image description here

I'm not sure why this is happening. My hunch is that it has to do with the fact that my repository is private, but what has me confused is the fact that the coverage badge comes from an SVG file directly in my private repository. This works fine on the site (possibly has to do with "artifacts", though I don't really understand the behavior). If the workflow badges are indeed private, how can I make them display on my site?

The only config file (or file that has anything to do with the GitHub Pages site) is my _config.yml, which has the following contents.

theme: jekyll-theme-cayman
plugins:
  - jemoji

I installed added jemoji to support the emoji shortcode in my title, which works fine.

Any help appreciated.

CodePudding user response:

Private repositories are not publicly visible. For security, any requests to them from an account without the right credentials will get a 404, so you can't guess which repositories exist.

Because the repository isn't available, your workflows and their results aren't public either. If you want a developer on your team to have the build status, invite them to your private repository. If you want your builds to be publicly visible, open source your repository.

CodePudding user response:

It can be because this tags are alterated because of github actions, so they update and change on the Repository, Github pages treats different the information so this tags are nos updating when you are accessing the web page.

Live tags from Shields.io doesn't work properly on github pages.

  • Related