bashwrite blog

Publish to Gihub Pages using Github Actions

Written in

Updated in

Tags: github action pages ghpages publish

Download github action

  1. Download .github/workflows/build.yaml in Github RayCC51/BashWrite
  2. Put the build.yaml in your your-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

setting image
setting image
  1. Push any files in your blog repository, or just run a github action. Then gh-pages branch will be created automatically.
  2. Go to the your blog repository settings.
  3. Settings -> Code and automation - Pages -> Build and deployment

    • Source: Deploy from a branch
    • Branch: gh-pages
  4. Save the settings.
  5. Your site is live at https://YOUR-NAME.github.io/ or https://YOUR-NAME.github.io/REPO-NAME/