Skip to content

Merge pull request #2463 from 0xPolygon/vcastellm-patch-1 #211

Merge pull request #2463 from 0xPolygon/vcastellm-patch-1

Merge pull request #2463 from 0xPolygon/vcastellm-patch-1 #211

Workflow file for this run

name: Hosted PR and Dev/Prod Deployment
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- dev
- main
workflow_dispatch:
inputs:
environment:
required: false
type: choice
description: "Select the environment to deploy to (only required for production deployment)"
options:
- staging
- prod
jobs:
deploy:
if: |
(github.event_name == 'pull_request' && startsWith(github.head_ref, 'hosted/')) ||
(github.event_name == 'push' && github.ref == 'refs/heads/dev') ||
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'workflow_dispatch' && inputs.environment == 'prod')
uses: ./.github/workflows/build_and_deploy.yml
with:
environment: ${{ inputs.environment ||
(github.ref == 'refs/heads/dev' && 'dev') ||
(github.ref == 'refs/heads/main' && 'staging') ||
(github.event_name == 'pull_request' && 'dev') ||
'dev' }}
secrets: inherit