-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (50 loc) · 1.46 KB
/
deploy-docs.yml
File metadata and controls
59 lines (50 loc) · 1.46 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
name: Deploy Docs
on:
workflow_call:
inputs:
skip-build:
description: 'Download build artifact from CI instead of rebuilding'
default: false
required: false
type: boolean
workflow_dispatch:
concurrency:
group: deploy-docs-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
name: Deploy to Cloudflare Pages
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Download build artifact
if: inputs.skip-build == true
uses: actions/download-artifact@v8
with:
name: docs-dist
path: apps/docs/dist/
- name: Install dependencies
working-directory: ./apps/docs
run: bun install
- name: Build docs
if: inputs.skip-build != true
working-directory: ./apps/docs
run: bun run build
env:
NODE_OPTIONS: --max-old-space-size=8192
NITRO_PRESET: cloudflare-pages
- name: Deploy to Cloudflare Pages
working-directory: apps/docs
run: bun run wrangler pages deploy dist --project-name=v-maplibre-docs
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}