Fit view on sub-workflow canvas for improved visualization and layout #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy NexusWorkflowStudio | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| env: | |
| DEPLOY_WEBHOOK_URL: ${{ secrets.DEPLOY_WEBHOOK_URL }} | |
| DEPLOY_WEBHOOK_SECRET: ${{ secrets.DEPLOY_WEBHOOK_SECRET }} | |
| steps: | |
| - name: Validate deploy webhook configuration | |
| run: | | |
| test -n "$DEPLOY_WEBHOOK_URL" || { echo "Missing DEPLOY_WEBHOOK_URL secret"; exit 1; } | |
| test -n "$DEPLOY_WEBHOOK_SECRET" || { echo "Missing DEPLOY_WEBHOOK_SECRET secret"; exit 1; } | |
| - name: Trigger deployment webhook | |
| run: | | |
| payload=$(cat <<EOF | |
| { | |
| "ref": "${GITHUB_REF}", | |
| "sha": "${GITHUB_SHA}", | |
| "repository": "${GITHUB_REPOSITORY}", | |
| "workflow": "${GITHUB_WORKFLOW}", | |
| "run_id": "${GITHUB_RUN_ID}" | |
| } | |
| EOF | |
| ) | |
| response_file=$(mktemp) | |
| http_code=$(curl --show-error --silent \ | |
| --output "$response_file" \ | |
| --write-out "%{http_code}" \ | |
| --retry 3 \ | |
| --retry-all-errors \ | |
| --max-time 30 \ | |
| -X POST \ | |
| -H "Content-Type: application/json" \ | |
| -H "X-Webhook-Secret: ${DEPLOY_WEBHOOK_SECRET}" \ | |
| -d "$payload" \ | |
| "$DEPLOY_WEBHOOK_URL") | |
| echo "Webhook response status: $http_code" | |
| echo "Webhook response body:" | |
| cat "$response_file" | |
| if [ "$http_code" -lt 200 ] || [ "$http_code" -ge 300 ]; then | |
| echo "Deployment webhook failed" | |
| exit 1 | |
| fi |