From d7575a28bdbbbe51f0585fdaeec276e4aacfb73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Sat, 16 May 2026 10:02:26 +0400 Subject: [PATCH] deploy: create workflow --- .gitea/workflows/deploy-beta.yml | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitea/workflows/deploy-beta.yml diff --git a/.gitea/workflows/deploy-beta.yml b/.gitea/workflows/deploy-beta.yml new file mode 100644 index 0000000..9cdacfa --- /dev/null +++ b/.gitea/workflows/deploy-beta.yml @@ -0,0 +1,41 @@ +name: Déploiement API BETA +run-name: ${{ gitea.actor }} déploie API BETA +on: + push: + branches: + - dev + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'yarn' + + - name: Installer les dépendances + run: yarn install --frozen-lockfile + + - name: Build Strapi + run: yarn build + + deploy: + needs: build + runs-on: ubuntu-latest + steps: + - name: Déployer sur le serveur + uses: appleboy/ssh-action@v1 + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_KEY }} + script: | + cd ${{ secrets.DEPLOY_PATH }} + git pull origin main + yarn install --frozen-lockfile + NODE_ENV=production yarn build + pm2 restart api-beta-pawol