Skip to content

Hugo ( - products-qa.conholdate.com) #8

Hugo ( - products-qa.conholdate.com)

Hugo ( - products-qa.conholdate.com) #8

Workflow file for this run

name: Hugo Segment
run-name: Hugo (${{ github.event.inputs.segment }} - ${{ github.event.inputs.bucket }})
on:
workflow_dispatch:
inputs:
segment:
description: Hugo Segment
type: string
disableLanguages:
description: Disabled Languages
type: string
bucket:
description: Deployment Bucket
type: string
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment }}
steps:
- uses: actions/checkout@main
with:
repository: conholdate/products.conholdate.com
token: ${{ secrets.REPO_TOKEN }}
fetch-depth: 0
- uses: peaceiris/actions-hugo@v3
with:
hugo-version: latest
extended: true
- uses: actions/setup-node@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.SECRET_ACCESS }}
aws-region: us-west-2
- name: Build
env:
HUGO_DISABLELANGUAGES: "${{ github.event.inputs.disableLanguages }}"
run: hugo --minify --enableGitInfo --printMemoryUsage --renderSegments "${{ github.event.inputs.segment }}"
- name: Upload to ${{ github.event.inputs.bucket }} bucket
run: aws s3 sync public s3://${{ github.event.inputs.bucket }}