Host your hugo website using Github pages and Github action

Build your website using github action

name: Build your hugo websiteon:
push:
workflow_dispatch:
jobs:
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.79.0"
- name: Build
run: hugo
- name: Deploy to live website
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
#external_repository: gurusabarish/hugo-profile-demo
publish_branch: demo
user_name: Github Actions deployment bot
user_email: githubactionsbot@users.noreply.github.com

Connecting your demo branch with github pages

--

--

--

Hey there!, I’m Gurusabarish. I build things for the web. A passionate web app developer. I tend to make use of modern web technologies to build websites.

Love podcasts or audiobooks? Learn on the go with our new app.

I automated publishing my VSCode Extension

Usage of Docker in Test Automation

Exposing TFTP Server as Kubernetes Service — Part 1

CS50 PSET2: Readability.c

How to Convert an RTF File to JPG in Ruby

MacOS for developers: Pain points.

Exploring DORA: How can science help you become a top developer?

Progress Update: Manager Classes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gurusabarish

Gurusabarish

Hey there!, I’m Gurusabarish. I build things for the web. A passionate web app developer. I tend to make use of modern web technologies to build websites.

More from Medium

Beginning with GitHub

Github

Getting Started with Docker

How to run/deploy playwright on Heroku?

Automatic “Alt+Tab” input with AutoHotKey