Skip to content

Merge pull request #4 from cloudartisan/codex/setup-dependabot-for-go… #91

Merge pull request #4 from cloudartisan/codex/setup-dependabot-for-go…

Merge pull request #4 from cloudartisan/codex/setup-dependabot-for-go… #91

Workflow file for this run

# Version-locked deployment workflow for Hugo site with Congo theme
# Hugo 0.148.1 + Congo v2.12.2 + Go 1.20.14 for reproducible builds
name: Deploy Hugo site
on:
push:
branches:
- main # Set this to your default branch
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4.1.7
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Go
uses: actions/setup-go@v5.2.0
with:
go-version: '1.25.0' # Pin to specific Go version for reproducible builds
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2.6.0
with:
hugo-version: '0.148.1' # Pin to 0.148.1 for Congo v2.12.2 compatibility
extended: true
- name: Debug Environment
run: |
echo "Current directory structure:"
ls -la
echo "Hugo configuration:"
cat config.yaml
echo "Hugo module configuration:"
hugo mod graph || echo "Hugo mod graph failed"
echo "Go mod configuration:"
cat go.mod || echo "No go.mod file found"
- name: Setup Hugo Modules
run: |
hugo mod tidy
hugo mod get github.com/jpanther/congo/v2@v2.12.2
- name: Build
run: hugo --minify --buildFuture
- name: Copy CNAME file
run: |
if [ -f "CNAME" ]; then
echo "Copying CNAME file to publish directory..."
cp CNAME public/
fi
- name: Deploy
uses: peaceiris/actions-gh-pages@v4.0.0
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages # deploying to gh-pages branch
cname: cloudartisan.com # Explicit CNAME setting for custom domain
force_orphan: true # Force clean deployment