-
-
Notifications
You must be signed in to change notification settings - Fork 26
126 lines (93 loc) · 3.38 KB
/
edge.yml
File metadata and controls
126 lines (93 loc) · 3.38 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: Edge Deployment
# Manual-only until edge deployment is fully implemented
on:
workflow_dispatch:
jobs:
cloudflare-deploy:
name: Deploy to Cloudflare Workers
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install wasm-tools
run: cargo install wasm-tools
- name: Install Wrangler
run: npm install -g wrangler
- name: Build Run CLI
run: cargo build --features v2 --release
- name: Build WASI component
run: |
cargo run --features v2 -- build --release
- name: Deploy to Cloudflare
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
cargo run --features v2 -- deploy --target edge --provider cloudflare
aws-lambda-deploy:
name: Deploy to AWS Lambda
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install wasm-tools
run: cargo install wasm-tools
- name: Install AWS CLI
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
- name: Build Run CLI
run: cargo build --features v2 --release
- name: Build WASI component
run: |
cargo run --features v2 -- build --release
- name: Deploy to AWS Lambda
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
run: |
cargo run --features v2 -- deploy --target edge --provider aws-lambda
vercel-deploy:
name: Deploy to Vercel
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install wasm-tools
run: cargo install wasm-tools
- name: Install Vercel CLI
run: npm install -g vercel
- name: Build Run CLI
run: cargo build --features v2 --release
- name: Build WASI component
run: |
cargo run --features v2 -- build --release
- name: Deploy to Vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: |
cargo run --features v2 -- deploy --target edge --provider vercel
edge-smoke-test:
name: Edge Deployment Smoke Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install wasm-tools
run: cargo install wasm-tools
- name: Build Run CLI
run: cargo build --features v2 --release
- name: Build test component
run: |
cargo run --features v2 -- build --release
- name: Test edge manifest generation
run: |
cargo run --features v2 -- deploy --target edge --provider cloudflare --dry-run
- name: Verify manifest
run: |
test -f target/deploy/edge-manifest.json
cat target/deploy/edge-manifest.json