Skip to content

Add CloudFront post back to dev site (#15) #70

Add CloudFront post back to dev site (#15)

Add CloudFront post back to dev site (#15) #70

Workflow file for this run

name: CI/CD
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy-development:
uses: ./.github/workflows/development.yml
secrets: inherit
deploy-production:
name: Deploy (loganmarchione.com)
needs: deploy-development
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Check out the codebase
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.120.1'
extended: true
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.ROLE_TO_ASSUME_ARN_PRD }}
role-duration-seconds: 900
aws-region: us-east-2
- name: Update CloudFront Distribution
run: sed -i "s/CLOUDFRONT_DISTRIBUTION_PRD/${{ secrets.CLOUDFRONT_DISTRIBUTION_PRD }}/g" config.yaml
- name: Build
run: hugo --gc -DEF --baseURL="https://${{ env.URL }}"
env:
URL: loganmarchione.com
- name: Deploy to S3
run: hugo deploy --maxDeletes -1 --invalidateCDN --target loganmarchione-com --logLevel info