Skip to content

Commit 736e2cd

Browse files
committed
test2
1 parent af301bb commit 736e2cd

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/publish.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ jobs:
4242
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.mod') }}
4343
restore-keys: |
4444
${{ runner.os }}-hugomod-
45+
# 新增:清理旧文件(解决缓存残留)
46+
- name: Clean
47+
run: |
48+
rm -rf public
49+
rm -rf resources/_gen
4550
- name: Setup Pages
4651
id: pages
4752
uses: actions/configure-pages@v5
@@ -50,7 +55,7 @@ jobs:
5055
HUGO_ENVIRONMENT: production
5156
run: |
5257
echo "Hugo Cache Dir: $(hugo config | grep cachedir)"
53-
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
58+
hugo --minify --cleanDestinationDir --gc --baseURL "${{ steps.pages.outputs.base_url }}/"
5459
- name: Upload artifact
5560
uses: actions/upload-pages-artifact@v3
5661
with:

0 commit comments

Comments
 (0)