-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 2.5 KB
/
Copy pathdeploy.yml
File metadata and controls
69 lines (59 loc) · 2.5 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
name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: deploy-production
cancel-in-progress: false
permissions:
contents: read
jobs:
deploy:
name: Deploy to Cloudflare Pages
runs-on: ubuntu-latest
# Buys a deployment-branch restriction (configured in repo settings) and a
# tracked deployment with its URL in the GitHub UI.
#
# It does NOT isolate the Cloudflare credentials: those are org-level
# secrets visible to every public repo in the org, and an environment adds
# secrets rather than restricting the ones already in scope.
#
# Named for what is deployed rather than for a stage, so npm publishing can
# get its own environment later without the names colliding.
environment:
name: site
url: https://lectio.losol.no
steps:
# Actions are pinned to commit SHAs, not tags: a tag can be moved, a SHA
# cannot. The trailing comment records the human-readable version.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm -r build
# Typecheck here too: this job builds independently of CI, and we would
# rather fail the deploy than publish something that does not typecheck.
- run: pnpm --filter lectio-docs typecheck
# Invoked directly rather than through cloudflare/wrangler-action: that
# action installs wrangler with `pnpm add`, which pnpm refuses at a
# workspace root without `-w`, so it never got as far as deploying.
# Calling wrangler ourselves also drops a third-party action and lets us
# pin the version rather than accept the action's default (3.90.0).
#
# Deploys as a Worker with static assets rather than to Pages: the same
# static upload today, but adding server-side logic later becomes a
# `main` entry instead of a platform migration.
- name: Deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
working-directory: apps/site-builder
run: >-
pnpm dlx wrangler@4.112.0 deploy
--name lectio-docs
--compatibility-date 2026-07-20
--assets ./build/client