Skip to content

Canonical GitHub Pages deploy workflow #8

Canonical GitHub Pages deploy workflow

Canonical GitHub Pages deploy workflow #8

Workflow file for this run

name: Deploy Hugo site to GitHub Pages
on:
push:
branches: ["master"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.147.2"
extended: true
- name: Build
run: | hugo --minify

Check failure on line 33 in .github/workflows/hugo-pages.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/hugo-pages.yml

Invalid workflow file

You have an error in your yaml syntax on line 33
echo "---- public/ (top) ----"
ls -la public | head -n 50
test -f public/index.html
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4