For some reason when pushing towards `gh-pages` branch from within a `github action` the commit appears to be correctly pushed towards the branch but does not trigger github pages deployments (within environment tabs).
Do you have any advice on what i could have a look at?
The `GITHUB_TOKEN` that is provided as a part of GitHub Actions doesn't have authorization to create any successive events, such as GitHub Pages builds. So while you can push to the `gh-pages` branch using the `GITHUB_TOKEN`, it won't spawn a GitHub Pages build. You'll need to create a personal access token and supply it to your GitHub Action as a secret.
I used https://github.com/peaceiris/actions-gh-pages for a recent project because it already has a workaround for exactly this problem and seems to be actively maintained.
I hope that helps!