Skip to content

Add another example pic #23

Add another example pic

Add another example pic #23

Workflow file for this run

name: CI/CD Workflow
on:
push:
release:
types:
- published
workflow_dispatch:
inputs:
environment:
description: "Environment to run deploy"
type: environment
required: true
force:
description: "Deploy even if tests fail"
type: boolean
required: false
default: false
jobs:
test:
name: Test πŸ§ͺ
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run tests
run: |
echo "Mock testing..."
deploy-to-staging:
name: Deploy to Staging 🚧
needs: test
if: github.event_name == 'push' && github.ref_name == 'main'
concurrency: staging
uses: "./.github/workflows/deploy.yml"
with:
environment: staging
secrets: inherit
deploy-to-production:
name: Deploy to Production 🌟
needs: test
if: github.event_name == 'release'
concurrency: production
uses: "./.github/workflows/deploy.yml"
with:
environment: production
secrets: inherit
manual-deployment:
name: Manual Deployment ❗️
needs: test
if: github.event_name == 'workflow_dispatch' && (success() || inputs.force == true)
concurrency: ${{ inputs.environment }}
uses: "./.github/workflows/deploy.yml"
with:
environment: ${{ inputs.environment }}
secrets: inherit