Update index.md #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 'latest' | |
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 |