Thanks! Yes, now it works! I was able to build and publish the site when I push a tag to the repository using this Github Action: https://github.com/cesalberca/blog/blob/master/.github/workflows/deploy.yml.
Because I have only one branch I didn’t want to publish everytime I pushed, but only when I create a tag with this script: https://github.com/cesalberca/blog/blob/master/scripts/deploy.sh. Hope it can help someone else too.