# On every push this script is executed on: push name: Build and deploy GH Pages jobs: build: runs-on: ubuntu-latest if: github.ref == 'refs/heads/zola' steps: - name: Checkout uses: actions/checkout@v3.0.0 - name: Set outputs id: vars run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Set commit id run: sed -e "s/tag\ =.*/tag = \"${{ steps.vars.outputs.sha_short }}\"/" -i config.toml - name: Build and push to gh-pages branch uses: shalzz/zola-deploy-action@v0.17.2 env: PAGES_BRANCH: gh-pages TOKEN: ${{ secrets.GITHUB_TOKEN }}