aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/website-deploy.yml
blob: 88283d6e7112d64c22175173814e2c5bca574028 (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
name: Trigger Website Deploy

on:
  workflow_dispatch:
  push:
    branches: [master]
    paths:
      - ".github/workflows/website-deploy.yml"
      - "docs/preview/**"
      - "docs/versions/**"
      - "src/detect/manifests/**"
      - "distribution/**"

permissions:
  contents: read

concurrency:
  group: private-website-deploy
  cancel-in-progress: true

jobs:
  trigger:
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
      - name: Trigger Cloudflare Pages build
        env:
          DEPLOY_HOOK: ${{ secrets.HERDR_WEBSITE_DEPLOY_HOOK }}
        run: |
          if [ -z "$DEPLOY_HOOK" ]; then
            echo "::error::HERDR_WEBSITE_DEPLOY_HOOK is not configured"
            exit 1
          fi
          curl -fsS -X POST "$DEPLOY_HOOK" > /dev/null
          echo "Triggered private website deploy"