This presentation is made thanks to the detailed description from Matteo Courthoud.
For more detail please checkout his post!
Go to your GitHub page and make a new repository (click on + button).
Then name the repository username.github.io where username is your Github username.

Switch to Rstudio and type the following:
# Install blogdown
install.packages("blogdown")
# Install Hugo
blogdown::install_hugo()
In Rstudio, go to the files, click on New Project and select New Directory.



You can select any other theme you like such as:
In the console, type:
You should be able to see this message:
blogdown::hugo_build(local=TRUE)

To preview the website, type the following in RStudio:
blogdown::serve_site()
Firstly, please go to config.yaml and change the baseurl to the url of the
webpage you would like to publish into.

Now, you need to push the contents of public/ folder to the GitHub repository.
# Go to the directory of the /project/public/
cd projectPath/public
# Init git in the /project/public/ folder
git init
# Add and commit the changes
git add --all
git commit -m "first version of the website"
# Set origin
git remote add origin https://github.com/username/username.github.io.git
# Rename local branch
git branch -M main
# And push your updates online
git push -u origin main
🥳🥳🥳