mirror of
https://github.com/Sea-Haven-Industries/.github.git
synced 2026-09-30 03:43:10 +00:00
* feat(ci): add HCP reusable workflows and drop Mergify Callers can pin org Fargate/SPA CD and parallel CI instead of copying per-repo deploy jobs. * chore(ci): remove deprecated PR policy reusable policy / pr is no longer a required check. Drop the callable, its unit tests, and the setup docs so callers stop pinning a retired gate.
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
name: Deploy Web
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths-ignore: [terraform/**, docs/**, "*.md"]
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs:
|
|
environment:
|
|
description: "Target Environment"
|
|
required: true
|
|
type: choice
|
|
options: [dev, prod]
|
|
ref:
|
|
description: "Git ref to build and deploy (tag, branch, or SHA). Empty means the workflow ref."
|
|
required: false
|
|
type: string
|
|
default: ""
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
deploy-dev:
|
|
name: Deploy SPA to dev
|
|
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.environment == 'dev')
|
|
uses: Sea-Haven-Industries/.github/.github/workflows/cd-hcp-spa.yaml@REPLACE-ME # vX.Y.Z
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
secrets: inherit
|
|
with:
|
|
environment: dev
|
|
ref: ${{ inputs.ref }}
|
|
ssm-prefix: /REPLACE-ME-repo/deploy
|
|
|
|
deploy-prod:
|
|
name: Deploy SPA to prod
|
|
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.environment == 'prod')
|
|
uses: Sea-Haven-Industries/.github/.github/workflows/cd-hcp-spa.yaml@REPLACE-ME # vX.Y.Z
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
secrets: inherit
|
|
with:
|
|
environment: prod
|
|
ref: ${{ github.event.release.tag_name || inputs.ref }}
|
|
ssm-prefix: /REPLACE-ME-repo/deploy
|
|
ship-gate: true
|
|
# required-vite-vars: "VITE_SHIFTS_API_BASE,VITE_SENTRY_DSN"
|