Skip to content

Create hugo.yml

Create hugo.yml #9

Workflow file for this run

name: Build and Deploy Hugo
on:
push:
branches: [ "main" ]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build Hugo Site
run: |
hugo \
--minify
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public
Deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./public