Publish to Gihub Pages using Github Actions
Written in
Updated in
Download github action
- Download
.github/workflows/build.yaml
in Github RayCC51/BashWrite - Put the
build.yaml
in youryour-blog-path/.github/workflows/
Directory
your_blog/
├─ .github/ <<< New!
│ ├─ workflows/ <<< New!
│ │ ├─ build.yaml <<< New!
├─ write/
│ ├─ post1.md
│ ├─ post2.md
├─ bw.sh
Settings in github.com

- Push any files in your blog repository, or just run a github action. Then gh-pages branch will be created automatically.
- Go to the your blog repository settings.
- Settings -> Code and automation - Pages -> Build and deployment
- Source: Deploy from a branch
- Branch: gh-pages
- Save the settings.
- Your site is live at https://YOUR-NAME.github.io/ or https://YOUR-NAME.github.io/REPO-NAME/