Skip to content

Refactor: Upgrade Next.js to version 16.0.10 for Hyperjump landing page #368

Refactor: Upgrade Next.js to version 16.0.10 for Hyperjump landing page

Refactor: Upgrade Next.js to version 16.0.10 for Hyperjump landing page #368

Workflow file for this run

name: PR
on:
workflow_dispatch: null
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
- name: Checkout repository
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Check formatting
run: bun run check-format
build:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
- name: Checkout repository
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Install Puppeteer and serve
run: bun install puppeteer serve
- name: Build and export
run: bun run build
- name: Start static server and take screenshots
id: screenshots
run: |
# Start the server in the background
bun run start &
# Wait longer for server to start
sleep 10
# Take screenshots
bun .github/scripts/take-screenshots.js
# Kill the server
kill $(lsof -t -i:3000)
echo "screenshot_path=screenshots" >> $GITHUB_OUTPUT
- name: Upload screenshots as artifacts
uses: actions/upload-artifact@v4
with:
name: preview-screenshots
path: screenshots/