Files
awesome-opencode/.github/workflows/site.yml
T
John SmithandClaude Opus 5.5 fdef3018ba fix(security): address CodeQL and SonarCloud findings
- Escape backslashes as well as pipes in markdown table cells
- Decide gist/discussion/npm-page links by parsed hostname instead of substring or unanchored regex checks (README, site)
- Encode every '/' in scoped npm names; validate npm names before calling the registry
- The REST helper only calls https://api.github.com and rejects dot segments
- npm ci --ignore-scripts in every workflow (no dependency needs install scripts)
- Move write permissions to job level in issues.yml and site.yml

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 13:10:04 -04:00

70 lines
1.6 KiB
YAML

# Builds the search site (site/ + registry.json + fresh health.json) and deploys it to GitHub Pages.
name: Deploy search site
on:
push:
branches:
- main
paths:
- 'data/**'
- 'site/**'
- 'scripts/**'
schedule:
- cron: '30 5 * * *'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '24'
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build site
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
node scripts/health-check.js --out "$RUNNER_TEMP/health.json" || echo "::warning::health check failed; deploying without health data"
if [ -f "$RUNNER_TEMP/health.json" ]; then
node scripts/build-site.js --health "$RUNNER_TEMP/health.json"
else
node scripts/build-site.js
fi
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: _site
deploy:
needs: build
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5