Update index.template.html #232
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # This line is the fix | |
| steps: | |
| - name: Check for bot commit | |
| if: github.actor == 'github-actions[bot]' | |
| run: | | |
| echo "Skipping build commit from previous action." | |
| exit 0 | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: 1.21 | |
| - name: Test | |
| run: make test | |
| - name: Build | |
| run: make index | |
| - name: Commit and push changes with Git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add index.html | |
| git commit -m "chore: build and deploy to GitHub Pages" | |
| git push |