File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,14 +154,23 @@ jobs:
154154 STDPKG : ${{ matrix.package }}
155155 run : deno test --allow-all tests/
156156
157+ # Stage the deployable under its canonical CDN name: native -> <pkg>.wasm, pure-Python (src/entry.py) -> <pkg>.py.
158+ - name : Stage artifact
159+ run : |
160+ mkdir -p _dist
161+ if [ -f "std/${{ matrix.package }}/src/entry.py" ]; then
162+ cp "std/${{ matrix.package }}/src/entry.py" "_dist/${{ matrix.package }}.py"
163+ else
164+ cp "$WASM" "_dist/${{ matrix.package }}.wasm"
165+ fi
166+
157167 - uses : actions/upload-artifact@v6
158- if : matrix.package != 'test'
159168 with :
160- name : wasm -${{ matrix.package }}
161- path : ${{ env.WASM }}
169+ name : dist -${{ matrix.package }}
170+ path : _dist/
162171 retention-days : 1
163172
164- # Publish every per-package wasm to Cloudflare Pages on pushes to main only.
173+ # Publish every per-package artifact (. wasm + .py) to Cloudflare Pages on pushes to main only.
165174 deploy :
166175 name : Deploy
167176 needs : wasm
@@ -170,15 +179,15 @@ jobs:
170179 permissions :
171180 contents : read
172181 steps :
173- # Pull every per-package wasm uploaded by the matrix above.
174- - name : Download wasm artifacts
182+ # Pull every per-package artifact uploaded by the matrix above.
183+ - name : Download artifacts
175184 uses : actions/download-artifact@v8
176185 with :
177- pattern : wasm -*
186+ pattern : dist -*
178187 path : _site/
179188 merge-multiple : true
180189
181- # Pages serves the wasm at std.edgepython.com/*.
190+ # Pages serves each package at std.edgepython.com/* (e.g. json.wasm, test.py) .
182191 - name : Deploy
183192 uses : cloudflare/wrangler-action@v4
184193 with :
You can’t perform that action at this time.
0 commit comments