Skip to content

chore: add deployment CI to OVH #85

chore: add deployment CI to OVH

chore: add deployment CI to OVH #85

Workflow file for this run

name: Deployment
on:
push:
branches:
- website
pull_request_target:
types: [opened, synchronize, reopened, closed, labeled]
workflow_dispatch:
jobs:
deploy:
if: github.event_name == 'push' || (github.event.action != 'closed' && github.event.action != 'labeled')
uses: ./.github/workflows/ovh.yaml
with:
environment_name: ${{ github.event_name == 'push' && 'production' || format('pull/{0}', github.event.pull_request.number) }}
url: ${{ github.event_name == 'pull_request' && format('https://{0}/pr/{1}', vars.PREVIEW_WEBSITE, github.event.pull_request.number) || format('https://{0}', vars.MAIN_WEBSITE) }}
target: ${{ github.event_name == 'pull_request' && format('pulls/pr/{0}', github.event.pull_request.number) || 'www' }}
action: deploy
secrets: inherit
cleanup:
if: |
github.event_name == 'pull_request' && (github.event.action == 'closed' || contains(github.event.pull_request.labels.*.name, 'stale'))
uses: ./.github/workflows/ovh.yaml
with:
environment_name: ${{ format('pull/{0}', github.event.pull_request.number) }}
target: ${{ format('pulls/pr/{0}', github.event.pull_request.number) }}
action: teardown
secrets: inherit