This GitHub action build a web report based on some dashlord content.
NEXT_PUBLIC_BASE_PATH
for the next.js build if you host the report in a subfolder. see https://nextjs.org/docs/api-reference/next.config.js/basepath
name: Build DashLord report
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: dashlord-report
uses: SocialGouv/dashlord-actions/report@v1
with:
base-path: /my-dashlord
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
branch: gh-pages
folder: build
To add a new column in the dashboard, you have to follow these steps (cf. Pull Request to add the SE current phase):
- Make sure the required info to displayed is stored in
report.json
. For instance, the SE current phase is stored in thebetagouv
key. - Create a summary extractor for your value. It will add the values that you specify to the summary key in the
report.json
. These values will then be accessible in the dashboard tab. For instance, we created abetagouv.js
file, that extracts the SE current phase from thebetagouv
key - Add a key to your
dashbord.yml
to enable the feature you want to use. For instance, we addedbetagouv
. - Add in
www/src/components/Dashboard.tsx
the column using thegetColumn
function - Add in
www/src/components/Url.tsx
the panel you want to display in the corresponding tab.
- A first step is to build a light index of latest scans in
www/src/report.json
. this is done by./src/index.js
. - The report website itself live in the
www
folder.
cd www
yarn
yarn start
💡 To work with fresh data, get the report
artifact from some of your Build website
dashlord job.