Useful for the theme to be able to know which versions can be switched between.
Could maybe add to standard deployment pipeline, just run every time a new change is merged (a bit excessive, but not that wasteful).
e.g.
steps:
- uses: octokit/request-action@v2.x
id: list_branches
with:
route: GET /repos/{owner}/{repo}/branches
owner: bluerobotics
repo: BlueOS-docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: echo "${{ steps.get_latest_release.outputs.data }}" > branches.json
- run: aws s3 cp branches.json s3://br-www-docs/docs/available-versions.json