Skip to content

Deploy Hugo Site to GitHub Pages #4

Deploy Hugo Site to GitHub Pages

Deploy Hugo Site to GitHub Pages #4

Workflow file for this run

name: Deploy Hugo Site to GitHub Pages
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy-to-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: latest
extended: true
- name: Build Hugo site
run: hugo
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.DEVOPSLOOP_DEV_DEPLOY_KEY }}
publish_dir: ./public
publish_branch: main
external_repository: "devopsloop-ss/devopsloop-ss.github.io"
cname: devopsloop-ss.github.io
- name: Display deployment link
run: |
echo " Site deployed to: https://devopsloop-ss.github.io Please test it!"