Add timezone configuration to prevent future post issues #86
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
| # 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.20.14' # 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 |