Ugh didn't know the project used next.js instead of react
All checks were successful
Build frontend / build (push) Successful in 1m6s
All checks were successful
Build frontend / build (push) Successful in 1m6s
This commit is contained in:
@ -3,7 +3,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -14,19 +13,28 @@ jobs:
|
|||||||
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
|
|
||||||
run: npm install --legacy-peer-deps
|
|
||||||
|
|
||||||
- name: Generate build
|
- name: Install dependencies
|
||||||
|
working-directory: /opt/sweetHome
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- 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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user