-
Notifications
You must be signed in to change notification settings - Fork 6
39 lines (32 loc) · 1.31 KB
/
_runtime.yml
File metadata and controls
39 lines (32 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: _Runtime CDN Upload
on:
workflow_call:
jobs:
deploy:
name: Cloudflare Pages
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "22"
# Download the .wasm already compiled and optimized by _wasm.yml.
- name: Download wasm artifact
uses: actions/download-artifact@v8
with:
name: compiler_lib_wasm
path: runtime/
# Stage runtime/ under /js/ so Pages serves it at runtime.edgepython.com/js/*. Reserved siblings: /wasi/ for the future WASI runtime.
- name: Stage publish dir
run: |
mkdir -p _site
cp -r runtime _site/js
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# Pin to the Pages production branch. `github.ref_name` would be the tag name (e.g. `v0.1.0`) on tag pushes, which Pages treats as a preview deploy with a per-branch URL — the custom domain `runtime.edgepython.com` would never pick it up.
command: pages deploy _site --project-name=edge-python-runtime --branch=main