Skip to content

Disable iPad autocorrect for terminal input #432

Disable iPad autocorrect for terminal input

Disable iPad autocorrect for terminal input #432

name: Deploy website
on:
push:
branches: [main]
paths:
- "js/website/**"
- "js/core/**"
- "js/react/**"
- "crates/browser/**"
pull_request:
paths:
- "js/website/**"
- "js/core/**"
- "js/react/**"
- "crates/browser/**"
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v6
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Deploy to Vercel
id: deploy
run: |
set -o pipefail
args=()
if [ "${{ github.event_name }}" = "push" ] && [ "${{ github.ref }}" = "refs/heads/main" ]; then
args+=(--prod)
fi
output=$(./bin/deploy-website "${args[@]}" 2>&1 | tee /dev/stderr) || exit $?
url=$(echo "$output" | grep -o 'https://[^ ]*\.vercel\.app' | tail -1)
if [ -z "$url" ]; then
echo "::error::deploy-website succeeded but no Vercel URL was found in its output" >&2
exit 1
fi
echo "url=$url" >> "$GITHUB_OUTPUT"
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
- name: Comment preview URL on PR
if: github.event_name == 'pull_request' && steps.deploy.outputs.url
uses: actions/github-script@v7
with:
script: |
const body = `🔗 **Preview:** ${{ steps.deploy.outputs.url }}`;
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
const existing = comments.find(c => c.body.startsWith('🔗 **Preview:**'));
if (existing) {
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existing.id,
body,
});
} else {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body,
});
}