Merge branch 'main' of http://45.93.137.91:3000/Rahaf/SweetHome
All checks were successful
Build frontend / build (push) Successful in 56s
All checks were successful
Build frontend / build (push) Successful in 56s
This commit is contained in:
40
.gitea/workflows/deployer.yaml
Normal file
40
.gitea/workflows/deployer.yaml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: Build frontend
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: amer2004/SweetHome
|
||||||
|
github-server-url: http://45.93.137.91:3000
|
||||||
|
|
||||||
|
- name: Stopping server
|
||||||
|
run: sudo systemctl stop sweetHome
|
||||||
|
|
||||||
|
- 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
|
||||||
|
with:
|
||||||
|
node-version: 22.x
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
working-directory: /opt/sweetHome
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build next project
|
||||||
|
working-directory: /opt/sweetHome
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Starting the server
|
||||||
|
run: |
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl start sweetHome
|
||||||
Reference in New Issue
Block a user