1. GitHub pages + Github action + Github Discussions + Codespaces?

These are all the functions that github has, you can learn more at:

GitHub Pages: https://pages.github.com
Github Action: https://github.com/features/actions
Github Discussions: https://docs.github.com/en/discussions
GitHub Codespaces: https://github.com/features/codespaces

2. What’s Hexo?

Hexo is a fast, simple and powerful blog framework.

You write posts in Markdown (or other markup languages) and Hexo generates static files with a beautiful theme in seconds.

You can check about here

3. Combine all in one blog? like f97.xyz

i. Have a hexo repo on github:

https://i.imgur.com/pqrNWFs.png

ii. A gh-pages branch for github pages:

https://i.imgur.com/J6ZLltG.png

and config github page to publish blog:

https://i.imgur.com/ETUPLHG.png

Note: If you want to use github site for private repo, you need to upgrade github to pro.

iii. Codespaces for edit posts:

Codespaces allow you code, edit file, create… on browser tab:

https://i.imgur.com/vDwBY5o.png

iv. Github action will auto deploy to gh-pages when you pushed:

You need a file same as:

node.js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: yarn
- run: git config --global user.email "huynhduckhoan@gmail.com"
- run: git config --global user.name "f97"
- run: yarn deploy

And when you push to repo:

https://i.imgur.com/1Tv5QaH.png

v. Github comment:

Try comment on this post and check it at https://github.com/f97/f97.xyz/discussions

I added it with giscus, you can check at here.

4. And after that?

Nothing will happen if you don’t write something and share it with someone, comment your blog below and we will be friends in the near future.