name:Deploy Hugo site to Pageson:push:branches:[main]pull_request:branches:[main]workflow_dispatch:# Allow one concurrent deploymentconcurrency:group:pages-${{ github.ref }}cancel-in-progress:truejobs:# Build jobbuild:runs-on:ubuntu-lateststeps:-name:checkoutuses:actions/checkout@v4with:submodules:true# Fetch Hugo themes (true OR recursive)fetch-depth:0# Fetch all history for .GitInfo and .Lastmod-name:Setup Hugouses:peaceiris/actions-hugo@v2with:hugo-version:'latest'extended:true-name:Setup Pagesid:pagesuses:actions/configure-pages@v3-name:Buildrun:hugo --gc --minify --baseURL ${{ steps.pages.outputs.base_url }}-name:Upload artifactuses:actions/upload-pages-artifact@v2with:path:./public# Deployment jobdeploy:needs:buildif:github.ref == 'refs/heads/main'# Grant GITHUB_TOKEN the permissions required to make a Pages deploymentpermissions:pages:write# to deploy to Pagesid-token:write# to verify the deployment originates from an appropriate sourceenvironment:name:github-pagesurl:${{ steps.deployment.outputs.page_url }}runs-on:ubuntu-lateststeps:-name:Deploy to GitHub Pagesid:deploymentuses:actions/deploy-pages@v2