Skip to content

WIP

WIP #4

Workflow file for this run

# Deploys the current branch to Kelvin using a webhook.
# The authorization token and the URL of the webhook are configured through
# GHA environment secrets `ENV_DEPLOY_TOKEN` and `ENV_DEPLOY_URL`, respectively.
name: Deploy
on:
workflow_dispatch:
push:
branches:
- master
jobs:
# Determine into which environment should this branch be deployed
# master => "production"
# other branch => "kelvin2"
setup:
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.production.outputs.environment }}
steps:
- id: production
run: echo "environment=${{ github.ref_name == 'master' && 'production' || 'kelvin2' }}" >> $GITHUB_OUTPUT
deploy:
needs: setup
runs-on: ubuntu-latest
concurrency: ${{ needs.setup.outputs.environment }}
environment: ${{ needs.setup.outputs.environment }}
steps:
- run: echo "Deploying to environment ${{ needs.setup.outputs.environment }}"
- run: 'curl --fail --silent --show-error -H"Authorization: Bearer ${{ secrets.ENV_DEPLOY_TOKEN }}" ${{ secrets.ENV_DEPLOY_URL }}'