Merge pull request #49 from Arcoss03/feat/release-branch #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to VPS | |
on: | |
push: | |
branches: | |
- release # Déclencher le déploiement uniquement sur la branche release | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 # Utilisation de Node.js 20 | |
- name: Set up SSH | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SECRET_KEY }} | |
- name: Deploy to VPS | |
run: | | |
ssh -o StrictHostKeyChecking=no [email protected] ' | |
cd /home/mini-game && | |
git pull origin release && | |
docker compose -f docker-compose.prod.yml down && | |
docker compose -f docker-compose.prod.yml up -d --build | |
' |