Skip to content

update

update #269

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
website:
name: Build Next.JS App
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/cache@v4
with:
path: .next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}
restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/bun.lockb') }}
- name: Install deps
run: bun install --frozen-lockfile
- name: Build
run: |
set -o pipefail
bun run build 2>&1 | tee -a build.log
env:
STANDALONE: "1"
DATABASE_URL: "libsql://void.riskymh.dev"
EMAIL_AUTH_TOKEN: "no"
S3_KEY_ID: "no"
NEXT_PUBLIC_APP_URL: "https://emailthing.xyz"
WEB_NOTIFICATIONS_PRIVATE_KEY: "no"
NEXT_PUBLIC_NOTIFICATIONS_PUBLIC_KEY: ${{ vars.NEXT_PUBLIC_NOTIFICATIONS_PUBLIC_KEY }}
S3_URL: "no"
S3_SECRET_ACCESS_KEY: "no"
- name: Echo build log to $GITHUB_STEP_SUMMARY
run: |
echo "\`\`\`txt" >> $GITHUB_STEP_SUMMARY
cat build.log >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
- name: Copy static asset files
run: |
mkdir --parents ./.next/standalone/public/_next/static
cp ./public -r ./.next/standalone
cp ./.next/static -r ./.next/standalone/public/_next
cp ./node_modules/@libsql/isomorphic-fetch/node.js ./.next/standalone/node_modules/@libsql/isomorphic-fetch/web.js
cp ./node_modules/@libsql/isomorphic-fetch/node.js ./.next/standalone/node_modules/@libsql/isomorphic-fetch/web.cjs
cp ./node_modules/@libsql/isomorphic-ws/node.mjs ./.next/standalone/node_modules/@libsql/isomorphic-ws/web.cjs
cp ./node_modules/@libsql/isomorphic-ws/node.mjs ./.next/standalone/node_modules/@libsql/isomorphic-ws/web.mjs
- uses: actions/upload-artifact@v4
with:
path: .next/standalone
name: Standalone Next.js
compression-level: 1
include-hidden-files: true