From 5574dd01dbd65e43c3a6af6bea77b7758bb779b7 Mon Sep 17 00:00:00 2001 From: Hamzeh Date: Wed, 18 Mar 2026 20:21:02 +0300 Subject: [PATCH] Added workflow file --- .gitea/workflows/deployer.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitea/workflows/deployer.yaml diff --git a/.gitea/workflows/deployer.yaml b/.gitea/workflows/deployer.yaml new file mode 100644 index 0000000..68bf542 --- /dev/null +++ b/.gitea/workflows/deployer.yaml @@ -0,0 +1,32 @@ +name: Build frontend +on: + push: + branches: + - main + +jobs: + build: + 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 + + + - name: Use Node.js 22.13.1 + uses: actions/setup-node@v1 + with: + node-version: 24.x + - name: Install dependencies + run: npm install + + - name: Generate build + run: npm run build + - name: Copy to Nginx root + run: | + sudo rm -rf /var/www/html/* + sudo cp -r dist/* /var/www/html/ + sudo chown -R www-data:www-data /var/www/html/ + sudo systemctl reload nginx \ No newline at end of file