Ugh didn't know the project used next.js instead of react
All checks were successful
Build frontend / build (push) Successful in 1m6s

This commit is contained in:
2026-03-19 18:00:06 +00:00
parent 45dcf54187
commit 9ea90a3f04

View File

@ -3,30 +3,38 @@ on:
push: push:
branches: branches:
- main - main
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Clone repository - name: Clone repository
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: Rahaf/SweetHome repository: Rahaf/SweetHome
github-server-url: http://45.93.137.91:3000 github-server-url: http://45.93.137.91:3000
- name: Stopping server
run: sudo systemctl stop sweetHome
- name: Use Node.js 22.13.1 - name: Copy repository to output file
run: |
sudo cp -r $GITHUB_WORKSPACE/* /opt/sweetHome/
sudo chown -R $(whoami) /opt/sweetHome
- name: Setup Node.js 22.x
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 24.x node-version: 22.x
- name: Install dependencies - name: Install dependencies
run: npm install --legacy-peer-deps working-directory: /opt/sweetHome
run: npm install
- name: Generate build
- name: Build next project
working-directory: /opt/sweetHome
run: npm run build run: npm run build
- name: Copy to Nginx root
- name: Starting the server
run: | run: |
sudo rm -rf /var/www/html/* sudo systemctl daemon-reload
sudo cp -r dist/* /var/www/html/ sudo systemctl start sweetHome
sudo chown -R www-data:www-data /var/www/html/
sudo systemctl reload nginx