-
-
Notifications
You must be signed in to change notification settings - Fork 26
97 lines (89 loc) · 2.88 KB
/
Copy pathdeploy-web.yml
File metadata and controls
97 lines (89 loc) · 2.88 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
name: Deploy Web
concurrency:
group: deploy-production
cancel-in-progress: false
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'apps/web/**'
- 'apps/shared/**'
- 'scripts/**'
- 'configs.json'
- 'package.json'
- 'bun.lock'
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
jobs:
typos:
name: Check for Typos
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24.x
- name: Checkout Repository
# actions/checkout v5
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
- name: Check for Typos
# v1.44.0
uses: crate-ci/typos@631208b7aac2daa8b707f55e7331f9112b0e062d
build:
runs-on: ubuntu-latest
needs: typos
timeout-minutes: 30
env:
NODE_OPTIONS: '--max-old-space-size=16384'
UV_THREADPOOL_SIZE: '32'
steps:
# actions/checkout v5
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
- uses: actions/setup-node@v6
with:
node-version: 24
# v2
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: 1.3.14
- name: Cache bun modules
uses: actions/cache@v5
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Cache Astro build
uses: actions/cache@v5
with:
path: |
apps/web/.astro
node_modules/.astro
node_modules/.cache
key: ${{ runner.os }}-astro-web-${{ hashFiles('**/bun.lock') }}-${{ hashFiles('apps/web/**', 'apps/shared/**', 'scripts/**', 'configs.json') }}
restore-keys: |
${{ runner.os }}-astro-web-${{ hashFiles('**/bun.lock') }}-
${{ runner.os }}-astro-web-
- run: bun install --frozen-lockfile
- name: Fetch latest global stats
run: |
GITHUB_STATS_REFRESH=true bun run fetch:stars
WEBSITE_STATS_REFRESH=true bun run fetch:website-stats
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- run: cd apps/web && bun run check
- run: bun run clean:build-cache
- run: bun run build:web
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
ORAMA_CLOUD_API_KEY: ${{ secrets.ORAMA_CLOUD_API_KEY }}
ORAMA_CLOUD_ENDPOINT: ${{ secrets.ORAMA_CLOUD_ENDPOINT }}
CLOUDFLARE_TURNSTILE_SITE_KEY: ${{ secrets.CLOUDFLARE_TURNSTILE_SITE_KEY }}
- run: bun run build:after
- run: bun run deploy:web
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}