-
Notifications
You must be signed in to change notification settings - Fork 30
66 lines (57 loc) · 2.17 KB
/
ar-ci.yml
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
name: AR CI
on:
push:
workflow_dispatch:
# Allow queued workflows to interrupt previous runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
# Allow GitHub to request an OIDC JWT ID token, to use with aws-actions/configure-aws-credentials
permissions:
id-token: write
contents: read
pull-requests: write # required by guardian/actions-riff-raff@v3
jobs:
build:
name: AR CI
runs-on: ubuntu-latest
# Checkout the repository
steps:
- uses: actions/checkout@v4
- name: Set up Node environment
uses: ./.github/actions/setup-node-env
# Execute some tasks from the `apps-rendering/package.json` file, using `pnpm`
- name: Build and package
working-directory: apps-rendering
run: |
pnpm test
pnpm build:client:prod
pnpm build:server:prod
pnpm copy-manifest
pnpm copy-fonts
pnpm synth
zip -j dist/server/mobile-apps-rendering.zip dist/server/*
- name: AWS Auth
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
aws-region: eu-west-1
mask-aws-account-id: true
- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v3
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
configPath: apps-rendering/riff-raff.yaml
projectName: Mobile::mobile-apps-rendering
buildNumberOffset: 27000 # This is the last build number from TeamCity
contentDirectories: |
mobile-apps-rendering-cfn:
- apps-rendering/cdk.out/MobileAppsRendering-CODE.template.json
- apps-rendering/cdk.out/MobileAppsRendering-PROD.template.json
mobile-apps-rendering-preview-cfn:
- apps-rendering/cdk.out/MobileAppsRenderingPreview-CODE.template.json
- apps-rendering/cdk.out/MobileAppsRenderingPreview-PROD.template.json
mobile-apps-rendering:
- apps-rendering/dist/server/mobile-apps-rendering.zip
mobile-assets:
- apps-rendering/dist/assets/