Skip to content

Support workers CDK #9330

Support workers CDK

Support workers CDK #9330

name: Build support-frontend
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
env:
GU_SUPPORT_WORKERS_LOAD_S3_CONFIG: false
jobs:
support_frontend_build:
if: >-
(github.actor != 'dependabot[bot]') &&
(github.repository_owner == 'guardian' ||
github.event_name == 'push')
# Required by actions-assume-aws-role
permissions:
id-token: write
contents: read
name: support-frontend build
runs-on: ubuntu-latest
steps:
- name: Env
run: env
- name: Checkout repo
uses: actions/checkout@v4
# (Respects .nvmrc)
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache-dependency-path: |
support-frontend/yarn.lock
cdk/yarn.lock
- name: Install
run: yarn
working-directory: support-frontend
- name: Build the html used for SSR pages
run: yarn run build-ssr
working-directory: support-frontend
- name: Build assets
run: yarn run build-prod
working-directory: support-frontend
- name: Build CFN from CDK
run: ./script/ci
working-directory: cdk
# Required by sbt riffRaffUpload
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
aws-region: eu-west-1
- uses: sbt/setup-sbt@v1
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "corretto"
cache: sbt
- name: Build, test, and upload to RiffRaff
run: |
export LAST_TEAMCITY_BUILD=10000
export GITHUB_RUN_NUMBER=$(( $GITHUB_RUN_NUMBER + $LAST_TEAMCITY_BUILD ))
sbt "project support-frontend" test riffRaffUpload