add next prev pagination tests #51
Workflow file for this run
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: Vercel Preview Deployment | |
| env: | |
| VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
| VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
| on: | |
| pull_request: | |
| branches: [ "master" ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: "vercel-preview-${{ github.event.pull_request.number }}" | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| uses: ./.github/workflows/tests.yml | |
| deploy-preview: | |
| needs: [test] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| # Do not run for PR from forks | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Vercel CLI | |
| run: npm install --global vercel@latest | |
| - name: Pull Vercel Environment Information | |
| run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Build Project Artifacts | |
| run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | |
| - name: Deploy Project Artifacts to Vercel | |
| id: deploy_step | |
| run: echo "preview-url=$(vercel deploy --prebuilt --archive=tgz --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_OUTPUT | |
| - name: Comment Preview URL | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| message: | | |
| Preview: ${{ steps.deploy_step.outputs.preview-url }} |