Skip to content

Update file(s) from groupdocs-viewer/Groupdocs.Viewer-References [dep… #20

Update file(s) from groupdocs-viewer/Groupdocs.Viewer-References [dep…

Update file(s) from groupdocs-viewer/Groupdocs.Viewer-References [dep… #20

Workflow file for this run

name: Deploy Viewer
# Deploys the viewer product family from `main` — the single deploy branch.
#
# The target environment is resolved by `resolve_targets.yml` (the single place that
# rule lives): an explicit choice on a manual run, a `[deploy-prod]` marker in the
# pushed commit messages (staging first, then production), or staging by default.
on:
push:
branches: [ main ]
paths:
- 'content/sites/groupdocs/viewer/**'
workflow_dispatch:
inputs:
environment:
description: 'Target environment'
required: true
default: production
type: choice
options:
- staging
- production
jobs:
targets:
uses: ./.github/workflows/resolve_targets.yml
with:
environment_override: ${{ github.event_name == 'workflow_dispatch' && inputs.environment || '' }}
staging:
needs: targets
if: ${{ needs.targets.outputs.staging == 'true' }}
uses: ./.github/workflows/deploy_product.yml
with:
product_family: viewer
environment: staging
secrets: inherit
# Runs only after staging succeeded (or was skipped by an explicit production choice),
# so a broken build can never reach the live site.
production:
needs: [targets, staging]
if: ${{ always() && needs.targets.outputs.production == 'true'
&& needs.staging.result != 'failure' && needs.staging.result != 'cancelled' }}
uses: ./.github/workflows/deploy_product.yml
with:
product_family: viewer
environment: production
secrets: inherit