Skip to content

feat: Deploy via Riff Raff #2615

feat: Deploy via Riff Raff

feat: Deploy via Riff Raff #2615

Workflow file for this run

name: CI
on:
push:
branches:
- 'main'
pull_request:
branches-ignore:
- 'gh-pages'
permissions: write-all
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Node
uses: ./.github/actions/setup-node-env
- name: Run unit tests
run: pnpm test -- --ci
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Node
uses: ./.github/actions/setup-node-env
- name: Lint files
run: pnpm lint
- name: Check formatting
run: pnpm prettier:check
types:
name: Type check
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Node
uses: ./.github/actions/setup-node-env
- name: Check types
run: pnpm tsc
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Node
uses: ./.github/actions/setup-node-env
- name: Build package
run: pnpm build
- name: Save build
uses: actions/upload-artifact@v4
with:
name: prod-bundle
path: dist/bundle/prod
riff-raff:
name: Upload Riff Raff Artifacts
needs: [build, test, lint, types]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Node
uses: ./.github/actions/setup-node-env
- name: Fetch build
uses: actions/download-artifact@v4
with:
name: prod-bundle
path: dist/bundle/prod
- name: Riff-Raff Upload
uses: guardian/actions-riff-raff@v4
with:
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: dotcom::commercial-bundle
configPath: ./riff-raff.yaml
contentDirectories: |
frontend-static/test_commercial_bundles:
- dist/bundle/prod/js
commercial/assets-map:
- dist/bundle/prod/assets-map