- 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
36 lines
685 B
YAML
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
|