Skip to content

Commit

Permalink
Update cd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
guesant authored Nov 19, 2024
1 parent b351b04 commit 987dcdd
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,14 @@ on:
- main

jobs:
teste:
runs-on: ubuntu-latest
steps:
- shell: bash
run: printenv

cd_build_push_development:
if: github.ref_name == 'main'
cd_build_push:

name: "Build and Push (Development)"
runs-on: ubuntu-latest

environment:
name: development
name: ${{ github.ref_name == 'main' && 'development' || 'production' }}

steps:
- uses: actions/checkout@v4
Expand All @@ -36,16 +30,15 @@ jobs:
push-image-registry-username: ${{ secrets.REGISTRY_USERNAME }}
push-image-registry-token: ${{ secrets.REGISTRY_TOKEN }}

cd_deploy_development:
if: github.ref_name == 'main'
cd_deploy:

name: Deploy to Cluster (Development)
name: Deploy to Cluster

runs-on: deploy
needs: [cd_build_push_development]
needs: [cd_build_push]

environment:
name: development
name: ${{ github.ref_name == 'main' && 'development' || 'production' }}
url: ${{ env.DEPLOYMENT_URL }}

steps:
Expand Down

0 comments on commit 987dcdd

Please sign in to comment.