2020-07-24 22:43:35 -07:00
|
|
|
name: Build and Deploy
|
|
|
|
|
2020-07-24 23:19:45 -07:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-07-24 22:43:35 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build and Deploy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-07-24 23:19:45 -07:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: Setup Hugo
|
|
|
|
uses: peaceiris/actions-hugo@v2
|
|
|
|
with:
|
|
|
|
hugo-version: '0.72.0'
|
|
|
|
extended: true
|
|
|
|
|
|
|
|
- name: Configure AWS Credentials
|
|
|
|
uses: aws-actions/configure-aws-credentials@v1
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
|
|
aws-region: us-east-1
|
|
|
|
|
2020-07-24 22:43:35 -07:00
|
|
|
- name: Hugo Build
|
2020-07-24 23:19:45 -07:00
|
|
|
run: hugo --minify
|
|
|
|
|
2020-07-24 22:43:35 -07:00
|
|
|
- name: Deploy to S3
|
2020-07-24 23:19:45 -07:00
|
|
|
run: hugo deploy --maxDeletes -1 --invalidateCDN
|