From 456025b0d896ce3de299df99d7bd3f120da537b9 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Fri, 7 Mar 2025 00:58:05 +0700 Subject: [PATCH] feat: cache in github actions --- .github/workflows/deploy-pages.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 0df23d1..1035ec0 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -41,6 +41,16 @@ jobs: - name: Setup Pages id: pages uses: actions/configure-pages@v5 + - name: Cache Hugo resources + uses: actions/cache@v4 + with: + path: | + resources/_gen + .hugo_build.lock + key: ${{ runner.os }}-hugo-resources-${{ hashFiles('**/*.md', '**/*.html', 'config/_default/**/*.yaml', 'config/_default/**/*.yml', 'themes/**') }} + restore-keys: | + ${{ runner.os }}-hugo-resources- + - name: Build with Hugo env: HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache