Skip to content

Commit 08e6fca

Browse files
committed
upgrade deploy workflow to Workers v4
1 parent 3f9c9ae commit 08e6fca

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,24 @@ jobs:
2727
steps:
2828
- name: Checkout
2929
uses: actions/checkout@v4
30-
- uses: dtolnay/rust-toolchain@stable
31-
- uses: Swatinem/rust-cache@v2
32-
- name: Install worker-build
33-
run: |
34-
cargo install worker-build
30+
- name: Install nix
31+
uses: cachix/install-nix-action@v31
32+
- name: Build nix
33+
run: nix build
34+
- name: Fix up wrangler toml
35+
run:
36+
cat wrangler.toml | sed 's/main = "build/main = "result/' > wrangler.toml
37+
cat wrangler.toml | sed 's/command = "worker-build --release"/command = "echo dummy build"' > wrangler.toml
3538
- name: Deploy
3639
uses: cloudflare/wrangler-action@v3
3740
# env:
3841
# YOUR_SECRET: ${{ secrets.YOUR_SECRET }}
3942
# YOUR_OTHER_SECRET: ${{ secrets.YOUR_OTHER_SECRET }}
4043
with:
44+
wranglerVersion: "4.19.1"
4145
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4246
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
47+
command: wrangler deploy
4348
# secrets: |
4449
# YOUR_SECRET
4550
# YOUR_OTHER_SECRET

0 commit comments

Comments
 (0)