Some checks failed
build-website / build (push) Failing after 35s
- Updated Gitea workflow to build Next.js instead of Nuxt - Removed working-directory references to apps/website - Created Dockerfile for Next.js production builds - Added standalone output mode to next.config.js for Docker - Updated build and artifact paths in workflow 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: build-website
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build Next.js
|
|
run: npm run build
|
|
|
|
- name: Install Docker CLI
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y docker.io
|
|
|
|
- name: Log in to registry
|
|
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login code.harborsmith.co -u matt --password-stdin
|
|
|
|
- name: Build and push image
|
|
env:
|
|
IMAGE: code.harborsmith.co/matt/website
|
|
run: |
|
|
docker build -f Dockerfile -t $IMAGE:${{ github.sha }} .
|
|
docker push $IMAGE:${{ github.sha }}
|
|
docker tag $IMAGE:${{ github.sha }} $IMAGE:latest
|
|
docker push $IMAGE:latest
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: website-dist
|
|
path: .next
|