This commit is contained in:
@ -1,35 +1,32 @@
|
|||||||
name: Build frontend
|
name: Build frontend
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: Rahaf/SweetHome
|
||||||
|
github-server-url: http://45.93.137.91:3000
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: Rahaf/SweetHome
|
|
||||||
github-server-url: http://45.93.137.91:3000
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Use Node.js 22.13.1
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 22
|
node-version: 24.x
|
||||||
|
- name: Install dependencies
|
||||||
- name: Install dependencies (ignore peer conflicts)
|
run: npm install --legacy-peer-deps
|
||||||
run: npm install --legacy-peer-deps
|
|
||||||
|
- name: Generate build
|
||||||
- name: Generate build
|
run: npm run build
|
||||||
run: npm run build
|
- name: Copy to Nginx root
|
||||||
|
run: |
|
||||||
- name: Copy to Nginx root
|
sudo rm -rf /var/www/html/*
|
||||||
run: |
|
sudo cp -r dist/* /var/www/html/
|
||||||
sudo rm -rf /var/www/html/*
|
sudo chown -R www-data:www-data /var/www/html/
|
||||||
sudo cp -r dist/* /var/www/html/
|
sudo systemctl reload nginx
|
||||||
sudo chown -R www-data:www-data /var/www/html/
|
|
||||||
sudo systemctl reload nginx
|
|
||||||
Reference in New Issue
Block a user