Files
api.pawol.nu/.gitea/workflows/deploy-beta.yml
T
cedric 7950eb4fae
Déploiement API BETA / build (push) Successful in 2m14s
Déploiement API BETA / deploy (push) Failing after 8s
deploy: add yarn
2026-05-16 10:03:50 +04:00

44 lines
965 B
YAML

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'
- name: Activer Corepack (yarn)
run: corepack enable
- 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