Deploy Hugo Blog to Github Pages via Github Actions w/ a Custom Domain

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ย. 2024
  • We will build and deploy a blog powered by Hugo to Github Pages via a custom Github Actions and link a custom domain to the pages.
    Blog post: theplaybook.de...
    Repo: github.com/dhi...
    PaperMod theme installation: github.com/adi...
    Managing a custom domain for Github Pages: docs.github.co...
    Linking domain to Github Pages: www.namecheap....

ความคิดเห็น • 52

  • @dhij
    @dhij  ปีที่แล้ว +8

    0:00 Intro
    0:33 Install Hugo, create a new site & a page
    1:48 Install the PaperMod theme & add the theme in config.yml
    3:03 Add minimal content in docs/test.md and run locally
    3:52 Create a git repository
    4:52 Create a gh-pages branch in the repo *important*
    5:20 Set read & write permissions for workflow *important*
    5:33 Create the github actions deploy file
    6:21 Edit the baseurl in config.yml to .github.io//
    7:16 Explain the steps in Github Actions workflow
    10:53 Link custom domain to Github Pages

  • @GustavAgar
    @GustavAgar 7 หลายเดือนก่อน +2

    Thank you so much for your script to make the deployment by github. Just an observation: i had to modify the version of hugo you are using in the script, because it told me that its deprecated that version, so i modify with the last one and it worked flawlessly

    • @dhij
      @dhij  7 หลายเดือนก่อน

      Awesome, glad that helped!

    • @canon1cal
      @canon1cal 6 หลายเดือนก่อน

      Could you tell where to add this?

    • @wa2k360
      @wa2k360 2 หลายเดือนก่อน

      Thanks for the comment bro, helped me out.

  • @natsudl575
    @natsudl575 ปีที่แล้ว +1

    Thanks for the video. The explanation of the steps were very easy and clear.

    • @dhij
      @dhij  ปีที่แล้ว

      Glad that helped!

  • @pasza
    @pasza ปีที่แล้ว +3

    Hello. A nice tut. Reproducing the steps, I found a tiny mistake: "--format" should be used instead of "-f". Probably they've changed it.

    • @reno2077
      @reno2077 ปีที่แล้ว +1

      yes. and the config.yaml is changed to hugo.yaml

    • @IvanaStastna
      @IvanaStastna 11 หลายเดือนก่อน

      Hello Pasza, I have tried to follow this tut but when I get to 3:33 to run Hugo server to display the site locally, I get a blank screen. I have noticed your comment about --format instead of -f and then @reno2077 comment about the config.yaml being Hugo.yaml now. But still, I get a blank screen. What should I do??? :(

    • @faraz2023
      @faraz2023 9 หลายเดือนก่อน

      Thanks a lot!

  • @staur19
    @staur19 11 หลายเดือนก่อน

    Very helpful. Thanks for the detailed tutorial!

  • @hoosier-daddy465
    @hoosier-daddy465 7 หลายเดือนก่อน +1

    Random question - what's the name of the iterm (terminal) theme? I like the way it shows the dates, colors, and branches etc

    • @tomvice
      @tomvice 6 หลายเดือนก่อน

      powerlevel10k ohmyzsh

  • @biboyog
    @biboyog 5 หลายเดือนก่อน

    Appreciated the tutorial!!!!!!

  • @AshwaniYadavIIT
    @AshwaniYadavIIT ปีที่แล้ว +2

    Liquid Exception: Liquid syntax error (line 468): Variable '{{??}'
    getting this error on action

    • @hidayat_pcd
      @hidayat_pcd ปีที่แล้ว +2

      I had this one too. It's gotta do with Jekyll trying to build the site anyway even though we are using hugo. This is the consequences of using the method in the video.
      You can add `touch .nojekyll` to deploy.yml just before `git add .` The site finally builds and gets deployed properly.

    • @wannabeAPT
      @wannabeAPT 5 หลายเดือนก่อน

      @@hidayat_pcd dude you are a life saver i was scratching my head for hours on this one, thanks so much!!!!

  • @hoherspatz9573
    @hoherspatz9573 ปีที่แล้ว

    wow thanks. I'm a GitHub noob but I always wanted to create my own blog for free.

    • @dhij
      @dhij  ปีที่แล้ว

      Glad that helped!

  • @linarkhilazhev5131
    @linarkhilazhev5131 ปีที่แล้ว

    thanks. good and usefull video.

  • @kadewu7291
    @kadewu7291 8 หลายเดือนก่อน +1

    I follwing the stps but I don't know why after I created the test.md it doesn't shows in the homepage

    • @abhijaiswal312
      @abhijaiswal312 6 หลายเดือนก่อน

      it will appear inside contents/docs

  • @TheLightBulp
    @TheLightBulp 5 หลายเดือนก่อน

    Hi , Great video.
    Do you happen to know how to enlarge the width of text on pages and posts ? thanks

  • @michaelmiller7181
    @michaelmiller7181 ปีที่แล้ว +1

    Thanks for this! I have been trying for days to get Hugo and Github running.
    I am stuck at 5:27
    Somehow I can not set my workflow permissions to "read and write permissions". The setting is not clickable for me.
    Permission denied, fatal: unable to access … and "Process completed with exit code 128".
    Can you help me out?

    • @dhij
      @dhij  ปีที่แล้ว

      Hmm, thats weird; is that your own repo though?

  • @sugoonese4024
    @sugoonese4024 10 หลายเดือนก่อน +1

    Lol my page just shows a my readme file
    is the gh-brand repo meant to not have the same content as main branch? I'm a complete git, github noob
    my gh branch just have a readme lmao

    • @sugoonese4024
      @sugoonese4024 10 หลายเดือนก่อน

      nvm i restarted everything and jus followed the docs on Hugo and it worked

    • @CSEAJMALAKRAMS
      @CSEAJMALAKRAMS 9 หลายเดือนก่อน

      How to add content in it.!? Actually I done all the thing he said.. I want to update daily as well.. Can u do in it..

    • @sugoonese4024
      @sugoonese4024 9 หลายเดือนก่อน +1

      @@CSEAJMALAKRAMS I pushed my website using the steps from Hugo documentations
      if I want to make changes I just push a commit to github and it automatically changes the website

    • @CSEAJMALAKRAMS
      @CSEAJMALAKRAMS 9 หลายเดือนก่อน

      @@sugoonese4024 thanks bro

  • @diegoarteaga166
    @diegoarteaga166 ปีที่แล้ว +1

    What would be the ideal work flow for making a new post?

    • @dhij
      @dhij  ปีที่แล้ว +1

      All you have to do would be to add an md file to your repository and push to the main branch!

  • @_elifilen
    @_elifilen หลายเดือนก่อน

    I followed all the steps (I had to change some commandes becouse I don"t have touch and vim ) but it give a blank page. also my project folder didn't upload

    • @dhij
      @dhij  หลายเดือนก่อน

      i could take a look if you have a public github repo 👍

  • @chris0617
    @chris0617 ปีที่แล้ว +1

    Tysm :)
    Do you know what to do if the images are not displayed?

    • @hoherspatz9573
      @hoherspatz9573 ปีที่แล้ว

      I have the same problem :(

    • @chris0617
      @chris0617 ปีที่แล้ว

      @@hoherspatz9573 i solved it deploying on netlify

  • @alexcricles
    @alexcricles 11 หลายเดือนก่อน

    my hugo site deployed very well, but the look was bad, may I ask you for help?

  • @giaochan504
    @giaochan504 ปีที่แล้ว

    What CMS would you recommend to connect to the blog?

  • @wa2k360
    @wa2k360 2 หลายเดือนก่อน

    My paper theme is insanely broken for some reason

    • @dhij
      @dhij  2 หลายเดือนก่อน

      :(

    • @wa2k360
      @wa2k360 2 หลายเดือนก่อน

      @@dhij Lol it's like the css isn't getting pushed somehow

  • @faizanmohammed7687
    @faizanmohammed7687 หลายเดือนก่อน

    Couldn't do it, it sucks how confusing git and github is. actions and all.

    • @dhij
      @dhij  หลายเดือนก่อน

      oh no, do take your time to learn one thing at a time! let me know if you have any specific question 👍

  • @DesignerYeb
    @DesignerYeb ปีที่แล้ว

    Sugo 했엉

    • @dhij
      @dhij  ปีที่แล้ว

      Thank you! 🙂

  • @CSEAJMALAKRAMS
    @CSEAJMALAKRAMS 9 หลายเดือนก่อน

    How to add content in it..

  • @0xShakhawat
    @0xShakhawat ปีที่แล้ว +1

    No url found for submodule path 'themes/PaperMod' in .gitmodules

    • @Mike-ie6ku
      @Mike-ie6ku 6 หลายเดือนก่อน

      did you solve it?

    • @0xShakhawat
      @0xShakhawat 6 หลายเดือนก่อน

      @@Mike-ie6ku Yes!! I solved that. But, can't remember right now

    • @Mike-ie6ku
      @Mike-ie6ku 6 หลายเดือนก่อน

      @@0xShakhawat oh(