Update openapi.json (#949) #2667
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: build_and_publish | |
| on: | |
| push: | |
| branches: | |
| - trunk | |
| tags: | |
| - v* | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| deployments: write | |
| pull-requests: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| name: Deploy | |
| permissions: | |
| contents: write | |
| deployments: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Install dependencies | |
| working-directory: website | |
| run: npm install | |
| - name: Build website | |
| working-directory: website | |
| run: npm run build | |
| - name: Deploy | |
| id: deploy | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| workingDirectory: website | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy build --project-name=spiceai-org-website --branch ${{ github.ref_name }} | |
| gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Add deploy comment to PR | |
| if: ${{ github.event_name == 'pull_request' }} | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '🚀 deployed to <${{ steps.deploy.outputs.deployment-url }}>' | |
| }) | |
| - name: Trigger search reindex after deployment | |
| if: ${{ github.ref == 'refs/heads/trunk' }} | |
| run: | | |
| curl -X POST "https://crawler.algolia.com/api/1/crawlers/${{ secrets.ALGOLIA_CRAWLER_ID }}/reindex" \ | |
| --user "${{ secrets.ALGOLIA_USER_ID }}":"${{ secrets.ALGOLIA_TOKEN }}" |