fix(#1346): harden protected route authorization boundary with teleme… #1
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 to Staging | ||
| on: | ||
| push: | ||
| branches: [develop] | ||
| environment: staging | ||
| jobs: | ||
| deploy-staging: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Build application | ||
| run: npm run build | ||
| env: | ||
| NEXT_PUBLIC_APP_ENV: staging | ||
| NEXT_PUBLIC_API_BASE_URL: ${{ secrets.STAGING_API_URL }} | ||
| NEXT_PUBLIC_STELLAR_NETWORK: testnet | ||
| NEXT_PUBLIC_STELLAR_HORIZON_URL: https://horizon-testnet.stellar.org | ||
| NEXT_PUBLIC_SOROBAN_RPC_URL: https://soroban-testnet.stellar.org | ||
| - name: Deploy to Vercel (Staging) | ||
| uses: amondnet/vercel-action@v25 | ||
| with: | ||
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | ||
| vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | ||
| vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | ||
| vercel-args: '--env NEXT_PUBLIC_APP_ENV=staging' | ||
| - name: Comment PR with staging URL | ||
| 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: '🚀 Staging deployment ready! Check it out at the Vercel preview URL.' | ||
| }) | ||