Skip to content

more template testing #27

more template testing

more template testing #27

Workflow file for this run

name: Deploy
concurrency: deploy
on:
release:
types: [published]
push:
branches:
- main
workflow_dispatch:
inputs:
environment:
description: |
Environment to deploy.
Must select the default branch for staging, and a release tag for production.
type: environment
required: true
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
steps:
- run: env
- run: echo "$GITHUB_CONTEXT"
staging:
if: |
github.event_name == 'push' || (
github.event_name == 'workflow_dispatch' &&
github.event.inputs.environment == 'staging' &&
github.ref_name == github.event.repository.default_branch
)
runs-on: ubuntu-latest
environment: staging
needs: build
steps:
- run: echo "TODO deploy staging iff we're a push or a manual trigger on ${{ github.event.repository.default_branch }}"
production:
if: |
github.event_name == 'release' || (
github.event_name == 'workflow_dispatch' &&
github.event.inputs.environment == 'production' &&
github.ref_type == 'tag'
)
runs-on: ubuntu-latest
environment: production
needs: build
steps:
- run: echo "TODO deploy production iff we're a release or a manual trigger on a tag"