Skip to content

chore: πŸ” 42Client μΆ”κ°€ #149

chore: πŸ” 42Client μΆ”κ°€

chore: πŸ” 42Client μΆ”κ°€ #149

Workflow file for this run

name: CI/CD
on:
push:
branches:
- dev
release:
types:
- created
jobs:
CD-dev:
name: develop
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
# needs: CI
steps:
- name: Deploy to Dev EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_DEV_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd 42Stat-Backend
git pull origin dev
git submodule update --init --recursive
docker-compose down -v
docker-compose -f docker-compose.dev.yml up -d

Check failure on line 30 in .github/workflows/cicd.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cicd.yml

Invalid workflow file

You have an error in your yaml syntax on line 30
CD-prod:
name: production
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
# needs: CI
steps:
- name: Deploy to Prod EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_PROD_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd 42Stat-Backend
git pull origin main
git submodule update --init --recursive
docker-compose down -v
docker-compose -f docker-compose.prod.yml up -d