Add our own AP feed to API/UI #495
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build and upload to riffraff | |
runs-on: ubuntu-22.04 | |
# These permissions are needed to interact with GitHub's OIDC Token endpoint. | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node for CDK | |
uses: actions/setup-node@v4 | |
with: | |
cache: "npm" | |
cache-dependency-path: "./package-lock.json" | |
node-version-file: ".nvmrc" | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version-file: ".java-version" | |
distribution: "corretto" | |
cache: "sbt" | |
- name: Lint and test | |
run: | | |
npm ci | |
npm run lint | |
npm test | |
- name: Build CDK | |
working-directory: cdk | |
run: | | |
npm run synth | |
- name: Build ingestion-lambda | |
working-directory: ingestion-lambda | |
run: | | |
npm run build | |
zip -FSjr "dist/ingestion-lambda.zip" "dist/handler.js" | |
- name: Build poller-lambdas | |
working-directory: poller-lambdas | |
run: | | |
npm run build | |
zip -FSjr "dist/poller-lambdas.zip" "dist/index.js" | |
- name: Build Newswires app and UI | |
working-directory: newswires | |
run: | | |
pushd client | |
npm ci | |
npm run lint:ci | |
npm run format:ci | |
npm test | |
popd | |
sbt clean scalafmtCheckAll compile test Debian/packageBin normalisePackageName | |
- name: Upload to Riff-Raff | |
uses: guardian/actions-riff-raff@v4 | |
with: | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} | |
projectName: "Editorial Tools::News Wires" | |
configPath: cdk/cdk.out/riff-raff.yaml | |
contentDirectories: | | |
cdk.out: | |
- cdk/cdk.out | |
ingestion-lambda: | |
- ingestion-lambda/dist/ingestion-lambda.zip | |
poller-lambdas: | |
- poller-lambdas/dist/poller-lambdas.zip | |
newswires: | |
- newswires/target/newswires.deb |