mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-01 10:53:11 +00:00
53 lines
1.8 KiB
YAML
53 lines
1.8 KiB
YAML
name: Deploy tf-poc content
|
|
|
|
on:
|
|
workflow_dispatch: {}
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: deploy-tf-poc
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Publish content to tf-poc
|
|
if: github.ref == 'refs/heads/feature/terraform-cd-poc'
|
|
runs-on: ubuntu-latest
|
|
environment: tf-poc
|
|
env:
|
|
AWS_REGION: us-east-1
|
|
VITE_API_URL: https://api.tf-poc.seahaven.com/api
|
|
EXPECTED_API_URL: https://api.tf-poc.seahaven.com/api
|
|
FORBIDDEN_API_URLS: https://api.dev.seahaven.com/api,https://api.staging.seahaven.com/api
|
|
SITE_URL: https://frontend-tf-poc.seahaven.com
|
|
SITE_BUCKET: seahaven-shoc-frontend-tf-poc
|
|
EXPECTED_SITE_BUCKET: seahaven-shoc-frontend-tf-poc
|
|
CLOUDFRONT_DISTRIBUTION_ID: ${{ vars.CLOUDFRONT_DISTRIBUTION_ID }}
|
|
API_SMOKE_URL: https://api.tf-poc.seahaven.com/swagger/v1/swagger.json
|
|
DEPLOY_RELEASE_ID: ${{ github.sha }}
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Terraform
|
|
uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1
|
|
with:
|
|
terraform_version: "1.9.8"
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
node-version: "24"
|
|
cache: npm
|
|
- name: Quality gates
|
|
run: npm ci && npm run verify
|
|
env:
|
|
GOVERNANCE_BASE: origin/dev
|
|
- name: Assume tf-poc deploy role (OIDC)
|
|
uses: aws-actions/configure-aws-credentials@e6de054238d6b7531b4efff3b6587d9aade6a06c # v6.2.3
|
|
with:
|
|
role-to-assume: arn:aws:iam::396287094661:role/githubdeploy-shoc-frontend-new-tf-poc
|
|
aws-region: us-east-1
|
|
- name: Build, publish, and verify SPA
|
|
run: bash scripts/deploy-web.sh
|