-
-
Notifications
You must be signed in to change notification settings - Fork 24
75 lines (67 loc) · 2.26 KB
/
deploy.yml
File metadata and controls
75 lines (67 loc) · 2.26 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
name: Deploy
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- main
jobs:
typos:
name: Check for Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Check for Typos
uses: crate-ci/typos@v1.44.0
build:
# Use a larger runner for faster builds
# ubuntu-latest-8-cores: 8 cores, 32GB RAM (requires GitHub Team/Enterprise or pay-per-use)
# ubuntu-latest: 4 cores, 16GB RAM (free tier)
runs-on: ubuntu-latest
needs: typos
env:
# Increase Node.js memory and I/O thread pool for faster builds
NODE_OPTIONS: '--max-old-space-size=16384'
UV_THREADPOOL_SIZE: '32'
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
# Cache bun dependencies
- name: Cache bun modules
uses: actions/cache@v5
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
# Cache Astro build artifacts
- name: Cache Astro build
uses: actions/cache@v5
with:
path: |
.astro
node_modules/.astro
node_modules/.cache
key: ${{ runner.os }}-astro-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('src/**', 'public/**', 'astro.config.mjs') }}
restore-keys: |
${{ runner.os }}-astro-${{ hashFiles('**/bun.lockb') }}-
${{ runner.os }}-astro-
- run: bun install
- run: bunx astro check
- run: bun run build:prepare
- run: bun run build
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: bunx wrangler@latest deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}