docs: fix broken links in the MCP setup guides #1525
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: Preview Deploy | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, closed] | |
| concurrency: | |
| group: preview-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| env: | |
| FLY_APP: docs-preview-pr-${{ github.event.pull_request.number }} | |
| FLY_ORG: ${{ vars.FLY_ORG || 'personal' }} | |
| jobs: | |
| build-and-deploy: | |
| if: github.event.action != 'closed' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| # Full history (and all branches) is needed to diff against the merge | |
| # base with the PR's base branch, which isn't always main | |
| fetch-depth: 0 | |
| - name: Generate change manifest | |
| env: | |
| PREVIEW_URL: https://${{ env.FLY_APP }}.fly.dev | |
| # Diff against the branch the PR targets, so a stacked PR lists only | |
| # its own changes instead of the whole stack | |
| PREVIEW_BASE_REF: origin/${{ github.event.pull_request.base.ref }} | |
| # The PR head commit (GITHUB_SHA is the synthetic merge ref on PRs) | |
| GITHUB_SHA: ${{ github.event.pull_request.head.sha }} | |
| run: node scripts/generate-preview-changes.mjs | |
| - name: Set up Fly CLI | |
| uses: superfly/flyctl-actions/setup-flyctl@fc53c09e1bc3be6f54706524e3b82c4f462f77be # v1.5 | |
| - name: Create Fly app (if not exists) | |
| run: | | |
| flyctl apps create "${{ env.FLY_APP }}" --org "${{ env.FLY_ORG }}" 2>/dev/null || true | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| - name: Generate fly.toml | |
| run: | | |
| cat > fly.toml <<EOF | |
| app = "${{ env.FLY_APP }}" | |
| primary_region = "ams" | |
| [build] | |
| dockerfile = "Dockerfile.preview" | |
| [http_service] | |
| internal_port = 8210 | |
| force_https = true | |
| auto_stop_machines = "stop" | |
| min_machines_running = 0 | |
| [[vm]] | |
| size = "shared-cpu-1x" | |
| memory = "256mb" | |
| EOF | |
| - name: Deploy to Fly.io | |
| run: | | |
| flyctl deploy \ | |
| --ha=false \ | |
| --remote-only \ | |
| --build-arg VAADIN_PRO_KEY="${{ secrets.VAADIN_PRO_KEY }}" | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| - name: Comment preview URL on PR | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| header: preview-deploy | |
| path: preview-comment.md | |
| cleanup: | |
| if: github.event.action == 'closed' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Fly CLI | |
| uses: superfly/flyctl-actions/setup-flyctl@fc53c09e1bc3be6f54706524e3b82c4f462f77be # v1.5 | |
| - name: Destroy Fly app | |
| run: | | |
| if flyctl apps list --json | jq -e --arg name "${{ env.FLY_APP }}" '.[] | select(.Name == $name)' > /dev/null; then | |
| flyctl apps destroy "${{ env.FLY_APP }}" --yes | |
| else | |
| echo "App ${{ env.FLY_APP }} does not exist, nothing to destroy" | |
| fi | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |