3434 ${{ runner.os }}-docusaurus-
3535
3636 # Cache build output for unchanged content
37- - name : Cache build output
38- uses : actions/cache@v4
37+ - name : Restore build cache
38+ id : cache-build-restore
39+ uses : actions/cache/restore@v4
3940 with :
4041 path : build
4142 key : ${{ runner.os }}-build-${{ hashFiles('docs/**', 'sidebars/**', 'src/**', 'static/**', 'docusaurus.config.js', 'package-lock.json') }}
@@ -46,12 +47,26 @@ jobs:
4647 run : npm ci
4748
4849 - name : Build application
50+ if : steps.cache-build-restore.outputs.cache-hit != 'true'
4951 run : |
50- echo "Building Docusaurus site..."
51- echo "Docusaurus will use cached artifacts when possible to speed up the build."
52+ echo "No build cache found, running full build..."
5253 npm run build
5354 echo "Build completed!"
5455
56+ - name : Skip build (using cache)
57+ if : steps.cache-build-restore.outputs.cache-hit == 'true'
58+ run : |
59+ echo "Build cache found! Skipping build step."
60+ echo "Using cached build output from previous run."
61+
62+ # Save the build output before modifying it
63+ - name : Save build cache
64+ if : steps.cache-build-restore.outputs.cache-hit != 'true'
65+ uses : actions/cache/save@v4
66+ with :
67+ path : build
68+ key : ${{ runner.os }}-build-${{ hashFiles('docs/**', 'sidebars/**', 'src/**', 'static/**', 'docusaurus.config.js', 'package-lock.json') }}
69+
5570 - name : Prepare deployment package
5671 run : |
5772 # Create a minimal package.json for production
0 commit comments