chore(deps): update actions/setup-go action to v5 (#5) #16
This file contains 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: Deploy to GitHub Pages | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Install dependencies | |
run: go mod tidy | |
- name: Build static site | |
run: go run main.go | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
# If you're changing the branch from main, | |
# also change the `main` in `refs/heads/main` | |
# below accordingly. | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./output |