Skip to content

Commit 6b6e3b7

Browse files
committed
Deploy to cloudflare
1 parent ee4eee4 commit 6b6e3b7

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: deploy
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
permissions:
7+
contents: read
8+
concurrency:
9+
group: ${{ github.workflow }}
10+
cancel-in-progress: true
11+
jobs:
12+
deploy:
13+
environment:
14+
name: cloudflare
15+
url: ${{ steps.wrangler.outputs.deployment-url }}
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v5
19+
- uses: asdf-vm/actions/install@v4
20+
- uses: pnpm/action-setup@v4
21+
- uses: actions/setup-node@v5
22+
with:
23+
cache: pnpm
24+
- uses: ocaml/setup-ocaml@v3
25+
with:
26+
dune-cache: true
27+
ocaml-compiler: 5
28+
opam-disable-sandboxing: true
29+
- run: opam install . --deps-only
30+
- run: pnpm install --frozen-lockfile
31+
- run: opam exec -- dune build
32+
- run: pnpm run build
33+
- run: rm dist/stats.html && cp dist/{index,404}.html
34+
- uses: cloudflare/wrangler-action@v3
35+
id: wrangler
36+
with:
37+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
38+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
39+
command: pages deploy dist --project-name=violette

0 commit comments

Comments
 (0)