Fixes in deployments & ci/cd, readme info
All checks were successful
Deploy NPM app / Deploy NPM (push) Successful in 1m3s

This commit is contained in:
Antoni Nuñez Romeu
2026-03-27 17:15:11 +01:00
parent 935921f698
commit 826ed1ce07
3 changed files with 61 additions and 62 deletions

View File

@@ -1,23 +1,24 @@
name: Deploy NPM app name: Deploy NPM app
run-name: ${{ gitea.actor }} is deploying to PROD servers. run-name: ${{ gitea.actor }} is deploying to PROD servers.
on: [push, fork, pull] on: [ push, fork, pull ]
jobs: jobs:
Deploy NPM: Deploy NPM:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: SSH to remote server - name: SSH to remote server
uses: appleboy/ssh-action@v1.0.3 uses: appleboy/ssh-action@v1.0.3
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }} password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }} port: ${{ secrets.PORT }}
script: | script: |
cd /home/zouklambadabcn.com/public_html/ cd /home/zouklambadabcn.com/public_html/
git pull git pull
npm run build npm install
pm2 restart ZLB npm run build
- run: echo "🍏 This job's status is ${{ job.status }}." pm2 restart ZLB
- run: echo "🍏 This job's status is ${{ job.status }}."

View File

@@ -19,7 +19,6 @@ jobs:
node-version: [18.x, 20.x, 22.x] node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps: steps:
- name: Test Summary - name: Test Summary
uses: test-summary/action@v2 uses: test-summary/action@v2
@@ -38,3 +37,25 @@ jobs:
- run: npm ci - run: npm ci
- run: npm run build --if-present - run: npm run build --if-present
- run: npm test - run: npm test
- name: Output Build Status
uses: actions/github-script@v6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { context } = require('@actions/github');
const core = require('@actions/core');
const fs = require('fs');
const path = require('path');
const readline = require('readline');
const outputPath = path.join(process.env.GITHUB_WORKSPACE, 'README.md');
const fileStream = fs.createWriteStream(outputPath, { flags: 'a' });
const rl = readline.createInterface({ input: process.stdin, output: fileStream });
if (context.isFailureGroup) {
core.setFailed('Build failed');
} else {
rl.write('## Build Status\n');
rl.write('![Build Status](https://github.com/{your_username}/{repository}/workflows/Node.js%20CI/badge.svg)\n');
rl.close();
}

View File

@@ -1,4 +1,25 @@
Follow these steps:
![Build Status](https://github.com/{your_username}/{repository_name}/workflows/{workflow_name}/badge.svg)
# Project Name
ZoukLambadaBCN Beach Festival 2026 edition
## Technologies Used
- Vite
- TypeScript
- React
- shadcn-ui
- Tailwind CSS
## Installation
1. Clone the repository using the project's Git URL.
2. Navigate to the project directory.
3. Install the necessary dependencies.
4. Start the development server with auto-reloading and an instant preview.
```sh ```sh
# Step 1: Clone the repository using the project's Git URL. # Step 1: Clone the repository using the project's Git URL.
@@ -12,47 +33,3 @@ npm i
# Step 4: Start the development server with auto-reloading and an instant preview. # Step 4: Start the development server with auto-reloading and an instant preview.
npm run dev npm run dev
```
**Edit a file directly in GitHub**
- Navigate to the desired file(s).
- Click the "Edit" button (pencil icon) at the top right of the file view.
- Make your changes and commit the changes.
**Use GitHub Codespaces**
- Navigate to the main page of your repository.
- Click on the "Code" button (green button) near the top right.
- Select the "Codespaces" tab.
- Click on "New codespace" to launch a new Codespace environment.
- Edit files directly within the Codespace and commit and push your changes once you're done.
## What technologies are used for this project?
This project is built with:
- Vite
- TypeScript
- React
- shadcn-ui
- Tailwind CSS
## How can I deploy this project?
```sh
# Step 1: Clone the repository using the project's Git URL.
git clone <YOUR_GIT_URL>
# Step 2: Navigate to the project directory.
cd <YOUR_PROJECT_NAME>
# Step 3: Install the necessary dependencies.
npm i
# Step 4: Start the development server with auto-reloading and an instant preview.
npm run build
npm install -g serve
serve -s dist
```