feat(alerts): evaluate insight alerts on the platform in parallel #16313
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Trigger Docs Preview Build | |
| on: | |
| pull_request: | |
| paths: | |
| - 'docs/**' | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'docs/**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| trigger-preview: | |
| # Skip merge-queue branches. No gate coverage is lost: the frontmatter, | |
| # internal-docs and link checks below are all continue-on-error, so they | |
| # never blocked a merge anyway. | |
| if: ${{ !startsWith(github.head_ref, 'trunk-merge/') }} | |
| name: Trigger posthog.com preview build | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Check frontmatter in published docs | |
| continue-on-error: true | |
| run: | | |
| echo "Checking for required frontmatter in published docs..." | |
| MISSING_FRONTMATTER=0 | |
| # Find all markdown/mdx files in published docs | |
| for file in docs/published/**/*.{md,mdx}; do | |
| if [ -f "$file" ]; then | |
| # Check if file starts with --- | |
| if ! head -1 "$file" | grep -q "^---"; then | |
| echo "❌ Missing frontmatter in: $file" | |
| MISSING_FRONTMATTER=1 | |
| fi | |
| fi | |
| done | |
| if [ $MISSING_FRONTMATTER -eq 1 ]; then | |
| echo "Some files are missing required frontmatter. All docs in /docs/published/ must have YAML frontmatter." | |
| exit 1 | |
| fi | |
| echo "✅ All published docs have frontmatter" | |
| - name: Verify internal docs not in published | |
| continue-on-error: true | |
| run: | | |
| echo "Verifying internal docs are not accidentally in published..." | |
| if find docs/published -name "*internal*" -o -name "*private*" -o -name "*secret*" 2>/dev/null | grep -q .; then | |
| echo "❌ Found internal/private docs in published directory!" | |
| exit 1 | |
| fi | |
| echo "✅ No internal docs found in published directory" | |
| - name: Check for broken links | |
| continue-on-error: true | |
| run: node .github/scripts/check-docs-links.js |