From c0ea8830afb2207c3a172da3f73f438ed55d4b4f Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Fri, 26 Jun 2026 12:08:42 +0100 Subject: [PATCH 1/2] update workflow to deploy to S3 --- .github/workflows/run.yml | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 9760461ad..598bfd8c2 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -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 }} @@ -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) + + 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: From e83eceb7a5667a3f7b2f9af71897766a532dc39e Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Mon, 29 Jun 2026 11:45:06 +0100 Subject: [PATCH 2/2] only use three env's --- .github/workflows/run.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 598bfd8c2..9502f5fb2 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -82,7 +82,7 @@ jobs: 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) + return environments.map(e => e.name).filter(name => name !== 'github-pages') upload_to_s3: runs-on: ubuntu-latest