Some checks failed
Build & Deploy to Hostverge FTP (Gitea Actions) / build-and-deploy (push) Failing after 56s
55 lines
2.0 KiB
YAML
55 lines
2.0 KiB
YAML
name: Build & Deploy to Hostverge FTP (Gitea Actions)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 📥 Clone Repository
|
|
env:
|
|
GITEA_TOKEN: ${{ gitea.token }}
|
|
run: |
|
|
echo "=== 1. Liaison locale 127.0.0.1 pour git.kaelstudio.tech ==="
|
|
echo "127.0.0.1 git.kaelstudio.tech" >> /etc/hosts
|
|
|
|
echo "=== 2. Configuration Git ==="
|
|
git config --global http.sslVerify false
|
|
git config --global curl.ipresolve 4
|
|
|
|
echo "=== 3. Initialisation et Clonage ==="
|
|
git init .
|
|
# Tente via le domaine HTTPS (127.0.0.1:443 Nginx), et si besoin directement sur le port Gitea (127.0.0.1:6000)
|
|
if ! git fetch --depth=1 "https://${GITEA_TOKEN}@git.kaelstudio.tech/${{ gitea.repository }}.git" "${{ gitea.ref_name || 'main' }}"; then
|
|
echo "Fallback vers connexion directe port 6000..."
|
|
git fetch --depth=1 "http://${GITEA_TOKEN}@127.0.0.1:6000/${{ gitea.repository }}.git" "${{ gitea.ref_name || 'main' }}"
|
|
fi
|
|
git checkout -f FETCH_HEAD
|
|
|
|
- name: 🟢 Setup Node.js 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: 📦 Install dependencies
|
|
run: npm ci || npm install
|
|
|
|
- name: 🛠️ Build application
|
|
env:
|
|
VITE_NCB_INSTANCE: ${{ secrets.VITE_NCB_INSTANCE || '54770_uwu_finances' }}
|
|
VITE_NCB_SECRET_KEY: ${{ secrets.VITE_NCB_SECRET_KEY || 'sk_live_0dydoaq1kib4f23ou6' }}
|
|
VITE_NCB_DATA_API_URL: ${{ secrets.VITE_NCB_DATA_API_URL || 'https://eu-api.nocodebackend.com' }}
|
|
run: npm run build
|
|
|
|
- name: 🚀 Deploy to Hostverge FTP
|
|
env:
|
|
FTP_HOST: ${{ secrets.FTP_SERVER || 'ftp.ka-el.fr' }}
|
|
FTP_USER: ${{ secrets.FTP_USERNAME || 'antigravity@ka-el.fr' }}
|
|
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD || 'dxr1yaor4i' }}
|
|
run: node scripts/deploy-ftp.cjs
|