diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index a2d9275..47ec5e3 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -17,30 +17,30 @@ jobs: fetch-depth: 0 # Cache the submodule content - #- name: Cache submodules - # id: cache-submodules - # uses: actions/cache@v3 - # with: - # path: | - # .git/modules - # themes/blowfish - # key: ${{ runner.os }}-submodules-${{ hashFiles('.gitmodules') }} - # restore-keys: | - # ${{ runner.os }}-submodules- + - name: Cache submodules + id: cache-submodules + uses: actions/cache@v3 + with: + path: | + .git/modules + themes/blowfish + key: ${{ runner.os }}-submodules-${{ hashFiles('.gitmodules') }} + restore-keys: | + ${{ runner.os }}-submodules- # Initialize submodules if cache miss - name: Initialize submodules - # if: steps.cache-submodules.outputs.cache-hit != 'true' + if: steps.cache-submodules.outputs.cache-hit != 'true' run: git submodule update --init --recursive # Cache Hugo dependencies and modules - #- name: Cache Hugo dependencies - # uses: actions/cache@v3 - # with: - # path: /tmp/hugo_cache - # key: ${{ runner.os }}-hugo-${{ hashFiles('**/go.sum') }} - # restore-keys: | - # ${{ runner.os }}-hugo- + - name: Cache Hugo dependencies + uses: actions/cache@v3 + with: + path: /tmp/hugo_cache + key: ${{ runner.os }}-hugo-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-hugo- - name: Setup Hugo uses: peaceiris/actions-hugo@v2 @@ -49,25 +49,25 @@ jobs: extended: true # Cache resources but not public to prevent infinite loops - #- name: Cache Hugo resources - # uses: actions/cache@v3 - # with: - # path: resources/_gen - # key: ${{ runner.os }}-hugo-resources-${{ hashFiles('content/**', 'layouts/**', 'static/**', 'themes/**', 'config/**') }} - # restore-keys: | - # ${{ runner.os }}-hugo-resources- + - name: Cache Hugo resources + uses: actions/cache@v3 + with: + path: resources/_gen + key: ${{ runner.os }}-hugo-resources-${{ hashFiles('content/**', 'layouts/**', 'static/**', 'themes/**', 'config/**') }} + restore-keys: | + ${{ runner.os }}-hugo-resources- - name: Build run: hugo --minify --buildFuture # Cache apt packages - #- name: Cache apt packages - # uses: actions/cache@v3 - # with: - # path: /var/cache/apt/archives - # key: ${{ runner.os }}-apt-${{ hashFiles('**/deploy.yml') }} - # restore-keys: | - # ${{ runner.os }}-apt- + - name: Cache apt packages + uses: actions/cache@v3 + with: + path: /var/cache/apt/archives + key: ${{ runner.os }}-apt-${{ hashFiles('**/deploy.yml') }} + restore-keys: | + ${{ runner.os }}-apt- - name: Install rsync run: sudo apt-get update && sudo apt-get install -y rsync