1919 image : quay.io/rockylinux/rockylinux:9
2020 options : --user root
2121 outputs :
22- DOCS_SHA : ${{steps.build .outputs.DOCS_SHA}}
22+ DOCS_SHA : ${{steps.docs-sha .outputs.DOCS_SHA}}
2323 environment : production
2424 steps :
2525 - name : Checkout mkdocs config
3030
3131 - name : set docs-sha
3232 id : docs-sha
33- run : echo "$DOCS_SHA" >> "$GITHUB_OUTPUT"
33+ run : echo "DOCS_SHA= $DOCS_SHA" >> "$GITHUB_OUTPUT"
3434 deploy :
3535 name : deploy
3636 needs : build
4040
4141 - uses : actions/checkout@v4
4242
43- - uses : actions/cache/restore@v4
43+ # - uses: actions/setup-node@v4
44+ - uses : action/setup-node@v4
45+ with :
46+ node-version : 20
47+
48+ # needs node
49+ - uses : actions/cache@v4
4450 id : docs-cache
4551 with :
4652 path : build/site/minified
4955 enableCrossOsArchive : true
5056
5157 - name : Retrieve build artifacts
52- if : steps.docs-cache.outputs.cache-hit != 'true'
5358 uses : actions/download-artifact@v4
5459 with :
5560 name : build-minified
@@ -66,14 +71,38 @@ jobs:
6671 run : npm install
6772 working-directory : ./compute-js
6873
74+ - name : restore cached fastly compute package
75+ id : restore-fastly-cache
76+ uses : actions/cache@v4
77+ with :
78+ path : |
79+ pkg/*.tar.gz
80+ key : cache-fastly-${{ steps.docs-sha.outputs.DOCS_SHA }}
81+
6982 - name : Build Compute Package
83+ if : steps.restore-fastly-cache.outputs.cache-hit != 'true'
7084 uses : fastly/compute-actions/build@v6
7185 with :
72- verbose : true
86+ verbose : false
7387 project_directory : compute-js
7488 env :
7589 FASTLY_API_TOKEN : ${{ secrets.FASTLY_API_TOKEN }}
7690
91+ - name : Upload fastly compute package
92+ uses : actions/upload-artifact@v4
93+ with :
94+ name : build-fastly-wasm
95+ path : |
96+ pkg/*.tar.gz
97+
98+ - name : cache fastly compute package
99+ id : cache-fastly
100+ uses : actions/cache@v4
101+ with :
102+ path : |
103+ pkg/*.tar.gz
104+ key : cache-fastly-${{ steps.docs-sha.outputs.DOCS_SHA }}
105+
77106 - name : Deploy Compute Package
78107 uses : fastly/compute-actions/deploy@v6
79108 with :
0 commit comments