-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 922 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#build my site and deploy to deploy to S3
name: Build and Deploy Hugo Site
# Controls when the action will run. Triggers the workflow on push
# events but only for the main branch
on:
push:
branches: [main]
jobs:
Build_and_Deploy:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Sets up Hugo
- name: Setup Hugo
uses: peaceiris/[email protected]
with:
hugo-version: "0.128.0"
extended: true
# Builds mikejobrien.com repo
- name: Build
run: hugo --minify
# Deploys built website to S3
- name: Deploy to S3
run: hugo deploy --force --maxDeletes -1 --invalidateCDN
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}