angrymichigander/.github/workflows/build.yml
Derek Slenk 21ce49b769 Add GitHub Actions workflows for build and deployment
- Add build.yml: builds Hugo site on all non-main branches and PRs
- Add deploy.yml: builds and deploys to S3 + CloudFront on main branch pushes
- Uses generic OIDC role for AWS authentication
2025-06-29 22:35:02 -04:00

36 lines
685 B
YAML

name: Build Site
on:
push:
branches-ignore:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true
- name: Build Hugo site
run: hugo --minify
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: hugo-build
path: public/
retention-days: 7