blog

Log | Files | Refs

build-check.yml (1258B)


      1 name: Build Check
      2 
      3 on:
      4   push:
      5     paths-ignore:
      6       - "images/**"
      7       - "LICENSE"
      8       - "README.md"
      9     branches:
     10       - master
     11       - exampleSite
     12   pull_request:
     13     paths-ignore:
     14       - "images/**"
     15       - "LICENSE"
     16       - "README.md"
     17     branches:
     18       - master
     19       - exampleSite
     20   workflow_dispatch:
     21     # manual run
     22     inputs:
     23       hugoVersion:
     24         description: "Hugo Version"
     25         required: false
     26         default: "0.146.0"
     27 
     28 defaults:
     29   run:
     30     shell: bash
     31 
     32 jobs:
     33   build-check:
     34     runs-on: ubuntu-latest
     35     env:
     36       # min_version from theme.toml
     37       HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.146.0' }}
     38     steps:
     39       - name: Install Hugo CLI
     40         run: |
     41           wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \
     42           && sudo dpkg -i ${{ runner.temp }}/hugo.deb
     43 
     44       - name: Checkout
     45         uses: actions/checkout@v6
     46         with:
     47           ref: exampleSite
     48 
     49       - name: Get Theme
     50         run: git submodule update --init --recursive
     51 
     52       - name: Update theme to Latest commit
     53         run: git submodule update --remote --merge
     54 
     55       - name: Build with Hugo
     56         run: hugo --buildDrafts --gc