Skip to content

Hugo (production)

Hugo (production) #14

Workflow file for this run

name: Hugo
run-name: Hugo (${{ github.event.inputs.environment }})
on:
workflow_dispatch:
inputs:
environment:
description: 'Build environment'
type: environment
default: staging
required: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
repository: Aspose/products.aspose.dev
token: ${{ secrets.REPO_TOKEN }}
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build
run: hugo --config "configs/common.toml,configs/home.toml" -b "https://products.aspose.dev/" --minify --templateMetrics --templateMetricsHints --enableGitInfo
- name: Deploy to S3
run: hugo deploy --config "configs/home.toml" --maxDeletes 0 --target "${{ github.event.inputs.environment }}" --invalidateCDN --force
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}