chore(deps): bump the production-dependencies group across 1 directory with 8 updates #30
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: PR Preview | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| group: preview-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| NODE_VERSION: '20' | |
| jobs: | |
| deploy-preview: | |
| if: github.actor != 'dependabot[bot]' | |
| name: Deploy Preview | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build docs site | |
| run: npm run docs:build | |
| - name: Verify Netlify credentials | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
| run: | | |
| code=$(curl -s -o /dev/null -w "%{http_code}" \ | |
| -H "Authorization: Bearer $NETLIFY_AUTH_TOKEN" \ | |
| "https://api.netlify.com/api/v1/sites/$NETLIFY_SITE_ID") | |
| echo "Netlify API status: $code" | |
| test "$code" = "200" | |
| - name: Deploy to Netlify (Preview) | |
| id: deploy | |
| uses: nwtgck/actions-netlify@v3.0 | |
| with: | |
| publish-dir: './docs-dist' | |
| production-deploy: false | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| deploy-message: "PR #${{ github.event.pull_request.number }}" | |
| alias: pr-${{ github.event.pull_request.number }} | |
| env: | |
| NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
| - name: Comment PR | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const url = '${{ steps.deploy.outputs.deploy-url }}'; | |
| const body = `## Preview Deployment\n\nYour preview is ready.\n\n**URL:** ${url}\n\n---\n<sub>Deployed from commit ${{ github.sha }}</sub>`; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body, | |
| }); |