紀錄建置過程

Setup 1

  • 在 GitHub 創立 holmeslin.github.io Repository
  • 創立 develop 分支
  • 把預設分支設為 develop
  • clone repository
  • 創立 Hugo Site
  • 創立 Action , 貼入以下內容

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    
    name: Github-Pages
    on:
      push:
        branches:
          - develop
    
    jobs:
      deploy:
        runs-on: ubuntu-18.04
        steps:
          - uses: actions/checkout@v1
            with:
              submodules: true
    
          - name: Setup Hugo
            uses: peaceiris/actions-hugo@v2
            with:
              hugo-version: '0.57.2'
              extended: true
    
          - name: Build
            run: hugo --gc --minify --cleanDestinationDir
    
          - name: Deploy
            uses: peaceiris/actions-gh-pages@v3
            with:
              github_token: ${{ secrets.GITHUB_TOKEN }}
              publish_branch: master
              force_orphan: true
  • 下載 Hugo Theme 調整內容

  • push 上去 Action 就會編譯之後合併至 master