-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (71 loc) · 1.93 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: ci
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
jobs:
static-site:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup bun
uses: oven-sh/setup-bun@v1
- name: Build static assets
working-directory: prosemirror-client
run: |
bun install
bun test
bun run build
- name: Upload static assets
uses: actions/upload-artifact@v3
with:
path: prosemirror-client/dist
- name: Deploy static assets
uses: guardian/actions-static-site@v2
with:
app: cql-sandbox
domain: cql-sandbox.gutools.co.uk
guActionsRiffRaffRoleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
gu-cdk-build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- 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
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '21'
cache: 'sbt'
- name: Run tests and build JAR
run: sbt test assembly
- name: Generate CDK
working-directory: ./cdk
run: |
npm ci
npm test
npm run synth
- name: Upload to Riff-Raff
uses: guardian/actions-riff-raff@v2
with:
projectName: cql::cql-lambda
configPath: ./cdk/cdk.out/riff-raff.yaml
contentDirectories: |
cdk.out:
- ./cdk/cdk.out/CqlLambda-PROD.template.json
cql-lambda:
- ./target/scala-3.4.2/cql-lambda.jar