Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
environment:
type: environment
description: The environment to deploy to.

env:
DLB_BOT_EMAIL: ${{ secrets.DLB_BOT_EMAIL }}
Expand Down Expand Up @@ -64,6 +68,46 @@ jobs:
- name: Commit docs
run: make commit-docs

detect-environments:
runs-on: ubuntu-latest
outputs:
environments: ${{ steps.environments.outputs.result }}
steps:
- uses: actions/github-script@v6
id: environments
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
result-encoding: json
script: |
if (context.payload?.inputs?.environment) return [context.payload?.inputs?.environment];
const {data: {environments}} =
await github.request(`GET /repos/${process.env.GITHUB_REPOSITORY}/environments`);
return environments.map(e => e.name).filter(name => name !== 'github-pages')

upload_to_s3:
runs-on: ubuntu-latest
needs: [build, detect-environments]
strategy:
matrix:
environment: ${{ fromJSON(needs.detect-environments.outputs.environments) }}
environment: ${{ matrix.environment }}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
ref: main

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.DEPLOY_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DEPLOY_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2

- name: Save to S3
run: |
aws s3 sync ./specification s3://${{ secrets.DEPLOY_COLLECTION_DATA_BUCKET }}/specification

check-build-specification-failure:
runs-on: ubuntu-latest
needs:
Expand Down
Loading