Skip to content

Deploy Cloud New

Deploy Cloud New #18

Workflow file for this run

name: Deploy Cloud New
on:
workflow_dispatch:
inputs:
skip_ci:
description: 'Skip CI and deploy directly'
type: boolean
required: false
default: false
push:
branches:
- master
permissions:
id-token: write
contents: read
env:
ACTIONS_RUNNER_DEBUG: true
ACTIONS_STEP_DEBUG: true
concurrency: deploy-cloud-staging
jobs:
ci:
uses: ./.github/workflows/ci.yml
with:
branchOrCommit: ${{ github.event.inputs.branchOrCommit || github.sha }}
skipCI: ${{ github.event.inputs.skip_ci }}
# ci-skipped:
# if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.skip_ci == 'true' }}
# runs-on: ubuntu-latest
# steps:
# - run: echo "CI was skipped by user input"
deploy-staging:
needs: ci
if: always() && (needs.ci.result == 'success' || needs.ci-skipped.result == 'success')
runs-on: ubuntu-latest
steps:
- run: |
echo "Starting deploy staging..."
sleep 35 # give you time to cancel manually
echo "Finished deploy"
check-staging:
needs: deploy-staging
if: needs.deploy-staging.result == 'success'
runs-on: ubuntu-latest
steps:
- run: echo "Check staging"
cancel-stack:
needs: deploy-staging
if: cancelled()
runs-on: ubuntu-latest
steps:
- run: echo "Cancelling stack"