Add OpenRouter as default AI provider via Cloudflare Worker proxy #91
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: Deploy Web Viewer to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'web/**' | |
| - '.github/workflows/deploy-pages.yml' | |
| workflow_dispatch: # Allow manual deployment | |
| inputs: | |
| graph_json_url: | |
| description: 'Default graph.json URL to load' | |
| required: false | |
| type: string | |
| default: 'https://raw.githubusercontent.com/Beneficial-AI-Foundation/scip-callgraph/main/web/public/graph.json' | |
| github_url: | |
| description: 'Default GitHub URL for source links' | |
| required: false | |
| type: string | |
| default: 'https://github.com/Beneficial-AI-Foundation/dalek-lite' | |
| github_path_prefix: | |
| description: 'Path prefix for source files (only needed if relative_path does not include it)' | |
| required: false | |
| type: string | |
| default: '' | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install dependencies | |
| working-directory: web | |
| run: npm ci | |
| - name: Type check | |
| working-directory: web | |
| run: npm run type-check | |
| - name: Run tests | |
| working-directory: web | |
| run: npm run test:run | |
| - name: Build web viewer | |
| working-directory: web | |
| env: | |
| VITE_GRAPH_JSON_URL: ${{ inputs.graph_json_url || 'https://raw.githubusercontent.com/Beneficial-AI-Foundation/scip-callgraph/main/web/public/graph.json' }} | |
| VITE_GITHUB_URL: ${{ inputs.github_url || 'https://github.com/Beneficial-AI-Foundation/dalek-lite' }} | |
| VITE_GITHUB_PATH_PREFIX: ${{ inputs.github_path_prefix || '' }} | |
| run: npm run build | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './web/dist' | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |