Update _index.md #13
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: 'Connect to an AWS role from a GitHub repository' | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
AWS_REGION : us-east-1 | |
# Permission can be added at job level or workflow level | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
hugo-build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git clone the repository | |
uses: actions/checkout@v3 | |
- name: configure aws credentials | |
uses: aws-actions/[email protected] | |
with: | |
role-to-assume: arn:aws:iam::052490168305:role/kampmeier-2232-defiance-web-site-publishing | |
role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Install Dart Sass Embedded # Installs dart-sass | |
run: sudo snap install dart-sass-embedded | |
- name: Set up Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: 0.121.1 | |
extended: true | |
- name: Build | |
run: hugo | |
- name: Deploy to S3 | |
run: hugo deploy --force --maxDeletes -1 --invalidateCDN |