Migrate from GitHub to Forgejo #1

Merged
deco merged 3 commits from forgejo-migration into main 2025-07-16 06:50:10 +03:00
Showing only changes of commit 9d96d366bf - Show all commits

View file

@ -1,66 +1,60 @@
# Workflow for building and testing Next.js site on non-master branches # Workflow for building and testing Next.js site on non-master branches
name: Build Check name: Build Check
on: on:
# Runs on pushes to any branch except master # Runs on pushes to any branch except master
push: push:
branches-ignore: ["master"] branches-ignore: ["master"]
# Runs on pull requests targeting any branch # Runs on pull requests targeting any branch
pull_request: pull_request:
branches: ["*"] branches: ["*"]
# Allow multiple concurrent build checks # Allow multiple concurrent build checks
concurrency: concurrency:
group: "build-check-${{ github.ref }}" group: "build-check-${{ github.ref }}"
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
build-check: build-check:
runs-on: self-hosted runs-on: self-hosted
permissions: permissions:
contents: read contents: read
steps: steps:
- name: Checkout - name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4 uses: https://code.forgejo.org/actions/checkout@v4
- name: Setup Node.js - name: Install dependencies
uses: https://code.forgejo.org/actions/setup-node@v4 run: npm ci
with:
node-version: "20" - name: Restore Next.js cache
cache: 'npm' uses: https://code.forgejo.org/actions/cache@v4
with:
- name: Install dependencies path: |
run: npm ci .next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
- name: Restore Next.js cache restore-keys: |
uses: https://code.forgejo.org/actions/cache@v4 ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
with:
path: | - name: Run linting
.next/cache run: npm run lint
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: | - name: Build Next.js site
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- run: npm run build
- name: Run linting - name: Run tests (if available)
run: npm run lint run: |
if npm run test --if-present; then
- name: Build Next.js site echo "✅ Tests passed"
run: npm run build else
echo " No tests found or tests skipped"
- name: Run tests (if available) fi
run: | continue-on-error: true
if npm run test --if-present; then
echo "✅ Tests passed" - name: Build verification complete
else run: |
echo " No tests found or tests skipped" echo "🎉 Build verification successful!"
fi echo "✅ Dependencies installed"
continue-on-error: true echo "✅ Linting passed"
echo "✅ Build completed successfully"
- name: Build verification complete echo "Ready for review and merge!"
run: |
echo "🎉 Build verification successful!"
echo "✅ Dependencies installed"
echo "✅ Linting passed"
echo "✅ Build completed successfully"
echo "Ready for review and merge!"