diff --git a/.github/workflows/ar-ci.yml b/.github/workflows/ar-ci.yml new file mode 100644 index 00000000000..9f7b7c8f7df --- /dev/null +++ b/.github/workflows/ar-ci.yml @@ -0,0 +1,73 @@ +name: "AR CI" + +on: + push: + paths-ignore: + - "dotcom-rendering/**" + + 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 + +jobs: + build: + runs-on: ubuntu-latest + + # Checkout the repository + steps: + - uses: actions/checkout@v4 + + # Get the desired version of Node installed + - uses: actions/setup-node@v3 + with: + cache: yarn + node-version-file: .nvmrc + + - name: Install dependencies + run: | + yarn --silent --frozen-lockfile + + # Execute some tasks from the `apps-rendering/package.json` file, using `yarn` + - name: Build and package + working-directory: apps-rendering + run: | + yarn test + yarn build:client:prod + yarn build:server:prod + yarn copy-manifest + yarn copy-fonts + yarn synth + zip -j dist/server/mobile-apps-rendering.zip dist/server/* + + - name: AWS Auth + uses: aws-actions/configure-aws-credentials@v2 + with: + role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} + aws-region: eu-west-1 + + - name: Upload to riff-raff + uses: guardian/actions-riff-raff@v2.2.2 + with: + 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/ +