Skip to content

Fix CSS path to use Hugo relURL for proper baseURL handling #5

Fix CSS path to use Hugo relURL for proper baseURL handling

Fix CSS path to use Hugo relURL for proper baseURL handling #5

Workflow file for this run

name: Deploy Hugo site to Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
actions: read
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
# Use GITHUB_TOKEN for organization repos
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
echo "Current directory: $(pwd)"
echo "Files in directory: $(ls -la)"
echo "Hugo version: $(hugo version)"
echo "Building with config: config.toml"
hugo \
--gc \
--minify \
--config config.toml
echo "Build complete. Contents of public/:"
ls -la public/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4