feat: Add Hugo AWS Complete Guide series and PlantUML extension (#203) #394
This file contains hidden or 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: Hugo Deploy | |
permissions: | |
id-token: write | |
contents: read # This is required for actions/checkout@v2 | |
on: | |
schedule: | |
- cron: '0 15 * * 1' # Mondays at 3:00 PM UTC (9:00 AM MT) - 1 hour after publish time | |
push: | |
branches: | |
- main # Set a branch to deploy | |
pull_request: | |
jobs: | |
deploy: | |
runs-on: ubuntu-24.04 | |
if: github.ref == 'refs/heads/main' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-region: us-east-2 | |
role-to-assume: ${{ secrets.TERRAFORM_AWS_DEPLOY_ROLE }} | |
role-session-name: HugoDeploy | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: 'latest' | |
extended: true | |
- name: hugo mod tidy | |
run: hugo mod tidy | |
- name: hugo npm pack | |
run: hugo mod npm pack | |
- name: npm install | |
run: npm install | |
- name: Build | |
run: hugo --minify | |
- name: Deploy | |
run: hugo deploy --config config.toml,config_deploy.toml |