feat(ci): add GitHub Actions workflow for Hugo site deploy

This commit is contained in:
Kumi 2024-07-15 08:43:41 +02:00
parent bd33e958ac
commit 79de9d750f
No known key found for this signature in database
GPG Key ID: ECBCC9082395383F

29
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Build and Deploy Hugo Site
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
- name: Build
run: hugo --minify
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: pages