chore: update CI
This commit is contained in:
@@ -124,5 +124,5 @@ jobs:
|
|||||||
username: ${{ secrets.SERVER_USER }}
|
username: ${{ secrets.SERVER_USER }}
|
||||||
key: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.SERVER_SSH_KEY_PROD || secrets.SERVER_SSH_KEY_PRE_PROD }}
|
key: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.SERVER_SSH_KEY_PROD || secrets.SERVER_SSH_KEY_PRE_PROD }}
|
||||||
script: |
|
script: |
|
||||||
docker compose -f ${{ secrets.COMPOSE_PATH }} pull backend waf
|
docker compose -f ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.COMPOSE_PATH_PROD || secrets.COMPOSE_PATH_PRE_PROD }} pull backend waf
|
||||||
docker compose -f ${{ secrets.COMPOSE_PATH }} up -d --no-deps backend waf
|
docker compose -f ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.COMPOSE_PATH_PROD || secrets.COMPOSE_PATH_PRE_PROD }} up -d --no-deps backend waf
|
||||||
|
|||||||
@@ -5,12 +5,10 @@ on:
|
|||||||
branches: [main, pre-prod]
|
branches: [main, pre-prod]
|
||||||
paths:
|
paths:
|
||||||
- "frontend-prep/**"
|
- "frontend-prep/**"
|
||||||
- "docker/frontend/**"
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, pre-prod]
|
branches: [main, pre-prod]
|
||||||
paths:
|
paths:
|
||||||
- "frontend-prep/**"
|
- "frontend-prep/**"
|
||||||
- "docker/frontend/**"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-typecheck:
|
lint-typecheck:
|
||||||
@@ -98,6 +96,7 @@ jobs:
|
|||||||
name: Deploy to server
|
name: Deploy to server
|
||||||
needs: docker
|
needs: docker
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: SSH deploy
|
- name: SSH deploy
|
||||||
@@ -107,5 +106,5 @@ jobs:
|
|||||||
username: ${{ secrets.SERVER_USER }}
|
username: ${{ secrets.SERVER_USER }}
|
||||||
key: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.SERVER_SSH_KEY_PROD || secrets.SERVER_SSH_KEY_PRE_PROD }}
|
key: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.SERVER_SSH_KEY_PROD || secrets.SERVER_SSH_KEY_PRE_PROD }}
|
||||||
script: |
|
script: |
|
||||||
docker compose -f ${{ secrets.COMPOSE_PATH }} pull frontend
|
docker compose -f ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.COMPOSE_PATH_PROD || secrets.COMPOSE_PATH_PRE_PROD }} pull frontend
|
||||||
docker compose -f ${{ secrets.COMPOSE_PATH }} up -d --no-deps frontend
|
docker compose -f ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && secrets.COMPOSE_PATH_PROD || secrets.COMPOSE_PATH_PRE_PROD }} up -d --no-deps frontend
|
||||||
|
|||||||
Reference in New Issue
Block a user