Skip to content

Commit

Permalink
seperate build and deploy steps
Browse files Browse the repository at this point in the history
  • Loading branch information
khanzadimahdi committed Jan 9, 2025
1 parent 7c02a3d commit c6cd617
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
push: false
container-registry: ${{ env.REGISTRY }}

cd:
build-and-push-images:
runs-on: ubuntu-latest

if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}
Expand Down Expand Up @@ -76,6 +76,18 @@ jobs:
container-registry-username: ${{ github.actor }}
container-registry-password: ${{ secrets.GITHUB_TOKEN }}

deploy:
runs-on: ubuntu-latest

if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}

needs:
- build-and-push-images

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Deploy services
run: |
# Setup ssh key
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
push: false
container-registry: ${{ env.REGISTRY }}

cd:
build-and-push-images:
runs-on: ubuntu-latest

if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}
Expand Down Expand Up @@ -67,6 +67,18 @@ jobs:
container-registry-username: ${{ github.actor }}
container-registry-password: ${{ secrets.GITHUB_TOKEN }}

deploy:
runs-on: ubuntu-latest

if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}

needs:
- build-and-push-images

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Deploy services
run: |
# Setup ssh key
Expand Down

0 comments on commit c6cd617

Please sign in to comment.