Use Github Actions with a JSON file as input for a matrix

You can use a JSON file as input for the strategy matrix by using the following as the workflow file inside .github/workflows/main.yml:

name: main
on: push

jobs:
  configure:
    runs-on: ubuntu-latest
    outputs:
      matrix: ${{ steps.set-matrix.outputs.matrix }}
    steps:
     - name: Checkout to repository
       uses: actions/checkout@v3
     - name: Set matrix data
       id: set-matrix
       run: echo "matrix=$(jq -c . < ./config.json)" >> $GITHUB_OUTPUT

  print:
    runs-on: ubuntu-latest
    needs: configure
    strategy:
      matrix: ${{ fromJson(needs.configure.outputs.matrix) }}
    steps:
     - run: echo ${{ matrix.name }}

where the configuration should be written with the include key explicitly in the root folder in config.json:

{
    "include": [
    {
        "name": "Mario"
    },
    {
        "name": "Luigi"
    }
    ]
}

To test this locally I have used act by simply running act in the root directory of the repository.

Creating a quick app using Supabase

The idea for this project is to finally use Pythonista on my phone. Every time I hit the Share Menu I see the option to Run a Pythonista script but I never had the opportunity (or imagination) to actually use it. Since I was already building a Dictionary app as part of a VueJS/FastAPI/Postgres project to get familiar with FastAPI I thought it would be interesting to use my phone to add words to the database. In addition to adding words to the database the Pythonista script will also query a dictionary API to add the definition to the table as well.

Moving blog to Cloudflare pages

With all the new ways of deploying your static websites without hosting your own servers I thought it was a good time for me to move away from Github Pages. For my Github hosted website I was using two repositories of which one is for the Pelican source data (Markdown and Jupyter notebooks) and one for the HTML output. Using one of these new services I do not need to worry about the output folder since the build of the HTML files will be done on the server and is not stored in your repository. I did a quick test with the famous Netlify which worked really well but it was slightly more difficult to setup a domain name. Because I am already using Cloudflare for my DNS it made sense to me to try out Cloudflare Pages to easily link my domain name and avoid having two repositories for one website.