summaryrefslogtreecommitdiff
path: root/.github/workflows/docs.yaml
blob: 4e00bf2feee94d507ee7f0102fba6e05daa3a031 (plain)
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
name: Deploy Docs

on:
  push:
    branches:
      - main
    paths:
      - "docs/**"
      - "mise.toml"
  workflow_dispatch:

jobs:
  deploy:
    runs-on: ubuntu-24.04
    concurrency:
      group: docs-${{ github.ref }}
      cancel-in-progress: true
    permissions:
      contents: read
    defaults:
      run:
        working-directory: "./docs"
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      - name: Setup Development Environment
        uses: jdx/mise-action@v3
        with:
          working_directory: .

      - name: Install dependencies
        run: bun install

      - name: Build documentation
        run: bun run build

      - name: Deploy to Cloudflare Workers
        uses: cloudflare/wrangler-action@v3
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          workingDirectory: docs