diff --git a/.github/workflows/Backend-CD.yml b/.github/workflows/Backend-CD.yml new file mode 100644 index 0000000..ebfb7d9 --- /dev/null +++ b/.github/workflows/Backend-CD.yml @@ -0,0 +1,31 @@ +name: Backend CD + +on: + workflow_run: + workflows: ["Backend CI"] + types: + - completed + +jobs: + build: + runs-on: self-hosted + + steps: + - uses: actions/checkout@v4 + + - name: Pull Docker image + run: sudo docker compose pull + + - name: Start Containers + env: + ENVIRONMENT: ${{ secrets.ENVIRONMENT }} + DB_NAME: ${{ secrets.DB_NAME}} + DB_USER: ${{ secrets.DB_USER}} + DB_HOST: ${{ secrets.DB_HOST}} + DB_PORT: ${{ secrets.DB_PORT}} + DB_PASSWORD: ${{ secrets.DB_PASSWORD}} + PORT: ${{ secrets.PORT}} + KEY: ${{ secrets.KEY}} + SECTRET: ${{ secrets.SECTRET}} + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY}} + run: sudo docker compose up --force-recreate diff --git a/.github/workflows/Backend CI.yml b/.github/workflows/Backend-CI.yml similarity index 68% rename from .github/workflows/Backend CI.yml rename to .github/workflows/Backend-CI.yml index 41391bd..2fd3b08 100644 --- a/.github/workflows/Backend CI.yml +++ b/.github/workflows/Backend-CI.yml @@ -21,15 +21,6 @@ jobs: env: ENVIRONMENT: ${{ secrets.ENVIRONMENT }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - DB_NAME: ${{ secrets.DB_NAME}} - DB_USER: ${{ secrets.DB_USER}} - DB_HOST: ${{ secrets.DB_HOST}} - DB_PORT: ${{ secrets.DB_PORT}} - DB_PASSWORD: ${{ secrets.DB_PASSWORD}} - PORT: ${{ secrets.PORT}} - KEY: ${{ secrets.KEY}} - SECTRET: ${{ secrets.SECTRET}} - GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY}} run: | docker compose build backend docker compose build graphql