Skip to content

Commit 2b44de1

Browse files
authored
支持刷新缓存 (#331)
1 parent d490dcc commit 2b44de1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/pr-preview.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: PR Preview
22
on:
3+
schedule:
4+
- cron: 0 0 */6 * *
35
issue_comment:
46
types: [created]
57
pull_request_target:
@@ -11,6 +13,16 @@ env:
1113
GITHUB_PR_NUMBER: ${{ github.event_name == 'issue_comment' && github.event.issue.number || github.event.pull_request.number }}
1214
JEKYLL_ENV: production
1315
jobs:
16+
cache-refresh:
17+
if: ${{ !github.event.repository.fork && github.event_name == 'schedule' && github.event.schedule == '0 0 */6 * *' }}
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Cache Refresh
21+
uses: actions/cache/restore@v4
22+
with:
23+
key: pages-${{ github.run_id }}
24+
path: /home/runner/gh-pages
25+
restore-keys: pages-
1426
preview-remove:
1527
if:
1628
${{

0 commit comments

Comments
 (0)