Skip to content

Update screenshots and remove unused ones #69

Update screenshots and remove unused ones

Update screenshots and remove unused ones #69

Workflow file for this run

name: Build and Deploy PR
on:
pull_request:
permissions:
contents: read
pull-requests: write
jobs:
build-and-deploy-pr:
name: Build and Deploy PR
runs-on: ubuntu-24.04
environment: preview
steps:
- name: Checkout PR
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 22
- name: Build the site
run: ./build.sh
- name: Deploy PR to Netlify
run: ./deploy.sh --alias pr-${{ github.event.number }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }}
- name: Comment PR with preview URL
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const prNumber = context.payload.number;
const previewUrl = `https://pr-${prNumber}--sf-help-preview.netlify.app`;
const marker = '<!-- sf-preview-link -->';
const body = `${marker}\n🚀 **Preview deployed!**\n\nYou can preview this PR at: ${previewUrl}`;
// Find existing comment with marker
const { data: comments } = await github.rest.issues.listComments({
issue_number: prNumber,
owner: context.repo.owner,
repo: context.repo.repo,
});
const alreadyCommented = comments.some(c => c.body && c.body.includes(marker));
if (!alreadyCommented) {
await github.rest.issues.createComment({
issue_number: prNumber,
owner: context.repo.owner,
repo: context.repo.repo,
body
});
}