Skip to content

Update main.yml

Update main.yml #2

Workflow file for this run

name: Build and Deploy Hugo Site to S3
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Hugo
run: |
HUGO_VERSION=0.92.2
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
tar -xvf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
sudo mv hugo /usr/local/bin/
- name: Debug SCSS files
run: ls -R assets/scss/components
- name: Build Hugo site
run: hugo
- name: Deploy to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: your-s3-region
run: aws s3 sync public/ s3://madisonmansouri.com/ --delete