diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 61f2c18..7be4ce1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,11 +33,14 @@ jobs: build: timeout-minutes: 30 runs-on: ubuntu-latest - name: Build + name: Build (Hugo ${{ matrix.hugo-version }}) needs: [filter] if: | github.ref == 'refs/heads/main' && github.event.repository.fork == false + strategy: + matrix: + hugo-version: ['latest', '0.114.0'] steps: - name: Set current date as env variable run: | @@ -52,7 +55,7 @@ jobs: - name: Setup Hugo uses: peaceiris/actions-hugo@v2.6.0 with: - hugo-version: '0.114.0' + hugo-version: ${{ matrix.hugo-version }} extended: true - name: Setup Dart Sass @@ -71,15 +74,17 @@ jobs: uses: actions/cache@v4 with: path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: ${{ runner.os }}-pnpm-store- + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('./pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Setup hugo cache uses: actions/cache@v4 with: path: ./exampleSite/resources - key: ${{ runner.os }}-hugo-${{ hashFiles('./exampleSite/resources') }} - restore-keys: ${{ runner.os }}-hugo- + key: ${{ runner.os }}-hugo-${{ matrix.hugo-version }}-${{ hashFiles('./exampleSite') }} + restore-keys: | + ${{ runner.os }}-hugo-${{ matrix.hugo-version }}- - name: Install dependencies run: pnpm install @@ -90,7 +95,10 @@ jobs: hugo --logLevel info --source=exampleSite --gc --minify - name: Push artifacts - if: ${{ (github.event_name == 'push' || github.event.pull_request.merged == true) && needs.filter.outputs.any_changed == 'true' }} + if: > + matrix.hugo-version == 'latest' && + (github.event_name == 'push' || github.event.pull_request.merged == true) && + needs.filter.outputs.any_changed == 'true' uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: 'ci: update bundled artifacts [skip ci]' diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 7a7fb9d..03d31da 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -54,4 +54,4 @@ jobs: if: ${{ steps.format.outcome == 'success' }} uses: stefanzweifel/git-auto-commit-action@v5 with: - commit_message: 'ci: format code' + commit_message: 'ci: format code [skip ci]'