47 lines
938 B
YAML
47 lines
938 B
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: alpine-latest
|
|
defaults:
|
|
run:
|
|
shell: sh
|
|
steps:
|
|
- name: Install Hugo and required tools
|
|
run: |
|
|
apk add --no-cache \
|
|
hugo \
|
|
aws-cli \
|
|
curl \
|
|
unzip \
|
|
gcompat \
|
|
libstdc++ \
|
|
make \
|
|
git
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
|
|
- name: Get Hugo and aws-cli version
|
|
run: |
|
|
hugo version && aws --version
|
|
|
|
- name: Build website
|
|
run: |
|
|
make build
|
|
|
|
- name: Deploy website
|
|
run: |
|
|
make deploy
|
|
env:
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|