Add Forgejo CI/CD workflows with self-hosted runners #1
1 changed files with 47 additions and 0 deletions
47
.forgejo/workflows/build.yml
Normal file
47
.forgejo/workflows/build.yml
Normal file
|
@ -0,0 +1,47 @@
|
|||
name: Lint and Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [ 20, 22 ]
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
|
||||
- name: Clean NextJS cache
|
||||
run: rm -rf .next
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run type check
|
||||
run: npm run type-check
|
||||
|
||||
- name: Run linter
|
||||
run: npm run lint
|
||||
|
||||
- name: Build project
|
||||
run: npm run build
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: obs-ss-${{ matrix.node-version }}
|
||||
include-hidden-files: 'true'
|
||||
path: ./.next/*
|
Loading…
Add table
Add a link
Reference in a new issue