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

Поделиться
HTML-код
  • Опубликовано: 19 фев 2023
  • 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.dev/docs/deploy-h...
    Repo: github.com/dhij/theplaybook
    PaperMod theme installation: github.com/adityatelange/hugo...
    Managing a custom domain for Github Pages: docs.github.com/en/pages/conf...
    Linking domain to Github Pages: www.namecheap.com/support/kno...

Комментарии • 44

  • @dhij
    @dhij  Год назад +7

    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

  • @staur19
    @staur19 9 месяцев назад

    Very helpful. Thanks for the detailed tutorial!

  • @natsudl575
    @natsudl575 Год назад +1

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

    • @dhij
      @dhij  Год назад

      Glad that helped!

  • @biboyog
    @biboyog 3 месяца назад

    Appreciated the tutorial!!!!!!

  • @GustavAgar
    @GustavAgar 5 месяцев назад +1

    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  5 месяцев назад

      Awesome, glad that helped!

    • @canon1cal
      @canon1cal 3 месяца назад

      Could you tell where to add this?

  • @linarkhilazhev5131
    @linarkhilazhev5131 Год назад

    thanks. good and usefull video.

  • @giaochan504
    @giaochan504 Год назад

    What CMS would you recommend to connect to the blog?

  • @hoosier-daddy465
    @hoosier-daddy465 4 месяца назад +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 4 месяца назад

      powerlevel10k ohmyzsh

  • @TheLightBulp
    @TheLightBulp 2 месяца назад

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

  • @alexcricles
    @alexcricles 9 месяцев назад

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

  • @kadewu7291
    @kadewu7291 5 месяцев назад +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 3 месяца назад

      it will appear inside contents/docs

  • @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!

  • @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?

  • @AshwaniYadavIIT
    @AshwaniYadavIIT Год назад +2

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

    • @hidayat_pcd
      @hidayat_pcd 10 месяцев назад +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 2 месяца назад

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

  • @pasza
    @pasza 9 месяцев назад +2

    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 9 месяцев назад +1

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

    • @IvanaStastna
      @IvanaStastna 9 месяцев назад

      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 7 месяцев назад

      Thanks a lot!

  • @CSEAJMALAKRAMS
    @CSEAJMALAKRAMS 7 месяцев назад

    How to add content in it..

  • @diegoarteaga166
    @diegoarteaga166 Год назад +1

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

    • @dhij
      @dhij  11 месяцев назад +1

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

  • @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

  • @beenii9373
    @beenii9373 Год назад

    Sugo 했엉

    • @dhij
      @dhij  Год назад

      Thank you! 🙂

  • @sugoonese4024
    @sugoonese4024 7 месяцев назад +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 7 месяцев назад

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

    • @CSEAJMALAKRAMS
      @CSEAJMALAKRAMS 7 месяцев назад

      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 7 месяцев назад +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 7 месяцев назад

      @@sugoonese4024 thanks bro

  • @0xShakhawat
    @0xShakhawat Год назад +1

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

    • @Mike-ie6ku
      @Mike-ie6ku 4 месяца назад

      did you solve it?

    • @0xShakhawat
      @0xShakhawat 4 месяца назад

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

    • @Mike-ie6ku
      @Mike-ie6ku 4 месяца назад

      @@0xShakhawat oh(