From 14994a201839fd7489afa2dfc500bda9dd9944a3 Mon Sep 17 00:00:00 2001 From: Tom Hipkin Date: Mon, 19 Apr 2021 10:40:26 +0100 Subject: [PATCH 1/3] Pushes to research branch auto deploy research environment --- .github/workflows/deploy.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cf10214e6..bf6355b83 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -50,6 +50,12 @@ jobs: run: | script/deploy-terraform if: github.ref == 'refs/heads/develop' + - name: Deploy terraform to research + env: + TF_VAR_environment: "research" + run: | + script/deploy-terraform + if: github.ref == 'refs/heads/research' - name: Deploy terraform to prod env: TF_VAR_environment: "prod" From e19b77b04ddd809df1cc7f8a6c535f9133916814 Mon Sep 17 00:00:00 2001 From: Tom Hipkin Date: Mon, 19 Apr 2021 10:46:58 +0100 Subject: [PATCH 2/3] Auto deploy to preview environment on push to main Preview and Production should be the same so content users can review their changes they want to make before pushing them to users. We may wish to have another preview environment for the staging Contentful environment in future, which would track develop. --- .github/workflows/deploy.yml | 6 ++++++ CHANGELOG.md | 2 ++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bf6355b83..a2fa2e623 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -56,6 +56,12 @@ jobs: run: | script/deploy-terraform if: github.ref == 'refs/heads/research' + - name: Deploy terraform to preview + env: + TF_VAR_environment: "preview" + run: | + script/deploy-terraform + if: github.ref == 'refs/heads/main' - name: Deploy terraform to prod env: TF_VAR_environment: "prod" diff --git a/CHANGELOG.md b/CHANGELOG.md index e8736ce31..ef1369a1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog 1.0.0]. ## [Unreleased] +- auto deploy research and preview environments + ## [release-007] - 2021-05-19 - Add `noindex,nofollow` meta tag to all pages, as per Gov.UK guidance From 7c4ff4896b892e17ef1b8535cf3d57f4d14d5365 Mon Sep 17 00:00:00 2001 From: Tom Hipkin Date: Mon, 19 Apr 2021 14:26:00 +0100 Subject: [PATCH 3/3] release-008 - auto deploy research and preview environments --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef1369a1f..cff1c720b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog 1.0.0]. ## [Unreleased] +## [release-008] - 2021-05-19 + - auto deploy research and preview environments ## [release-007] - 2021-05-19 @@ -124,7 +126,8 @@ Contentful fixture - Contentful can redirect users to preview endpoints - users can be asked to answer a long text question -[unreleased]: https://github.com/DFE-Digital/buy-for-your-school/compare/release-007...HEAD +[unreleased]: https://github.com/DFE-Digital/buy-for-your-school/compare/release-008...HEAD +[release-008]: https://github.com/DFE-Digital/buy-for-your-school/compare/release-007...release-008 [release-007]: https://github.com/DFE-Digital/buy-for-your-school/compare/release-006...release-007 [release-006]: https://github.com/DFE-Digital/buy-for-your-school/compare/release-005...release-006 [release-005]: https://github.com/DFE-Digital/buy-for-your-school/compare/release-004...release-005