name: Deployment

on:
  push:
    branches:
        - main

jobs:
  docker:
    name: Deploy with docker
    runs-on: [self-hosted, Linux, X64]
    steps:
      -
        name: Checkout
        uses: actions/checkout@v4
      -
        name: Copy environment variables to correct file
        run: cp /home/dev/.backend.env backend/.env && cp /home/dev/.idp.env config/idp/.env
      -
        name: Start docker
        run: docker compose -f compose.yml -f compose.production.yml up --build -d
        
