mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-16 00:14:53 +00:00
feat: use cache when deploy on github pages
This commit is contained in:
1 parent
03315336df
commit
f5f01ae20a
1 file changed
+14
@@ -120,6 +120,14 @@ jobs:
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Install Node.js dependencies
|
||||
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
|
||||
- name: Restore resources
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: |
|
||||
resources
|
||||
key: ${{ runner.os }}-resources-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-resources-
|
||||
- name: Build with Hugo
|
||||
env:
|
||||
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
|
||||
@@ -130,6 +138,12 @@ jobs:
|
||||
--gc \
|
||||
--minify \
|
||||
--baseURL "${{ steps.pages.outputs.base_url }}/"
|
||||
- name: Save resources
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: |
|
||||
resources
|
||||
key: ${{ runner.os }}-resources-${{ github.run_id }}
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
|
||||
Reference in new issue
Block a user