Skip to content

Commit 3b8d1e2

Browse files
committed
使用cache 同步build目录
1 parent 23e1970 commit 3b8d1e2

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

.github/workflows/gh-pages.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,20 @@ jobs:
5050
HUGO_ENV: production
5151
run: |
5252
hugo \
53-
--minify \
54-
--baseURL "${{ steps.pages.outputs.base_url }}/"
53+
--minify
5554
- name: Upload artifact
5655
uses: actions/upload-pages-artifact@v1
5756
with:
5857
path: ./public
58+
- uses: actions/upload-artifact@v3
59+
with:
60+
name: my-artifact
61+
path: ./public
62+
- uses: actions/cache@v2
63+
id: restore-build
64+
with:
65+
path: ./public
66+
key: "hugo-build"
5967

6068
# Deployment job
6169
deploy:
@@ -73,11 +81,12 @@ jobs:
7381
runs-on: ubuntu-latest
7482
needs: build
7583
steps:
76-
77-
- name: Download build artifact
78-
uses: actions/download-artifact@v3
84+
85+
- uses: actions/cache@v2
86+
id: restore-build
7987
with:
8088
path: ./public
89+
key: "hugo-build"
8190

8291
- name: IPFS Pinata deploy
8392
id: ipfs

config.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
baseURL = ""
1+
# baseURL = "https://linuxhub-group.gitlab.io"
2+
relativeURLs = true
23
languageCode = "zh-cn"
34
title = "Linuxhub"
45
theme = "github-style"
@@ -7,6 +8,7 @@ pygmentsCodeFences = true
78
pygmentsUseClasses = true
89

910
[params]
11+
searchURL = "https://linuxhub-group.gitlab.io"
1012
author = "LinuxHub"
1113
description = "In solitude, where we are least alone."
1214
github = "LinuxHub-Group"
@@ -21,9 +23,9 @@ pygmentsUseClasses = true
2123
rss = true
2224
lastmod = true
2325
userStatusEmoji = "🥵"
24-
favicon = "/images/github.png"
26+
favicon = "images/github.png"
2527
location = "Japan"
26-
enableGitalk = true
28+
enableGitalk = false
2729

2830
# [params.gitalk]
2931
# clientID = "Your client ID"

0 commit comments

Comments
 (0)