From bd84e3638ad655442307da4015d5c46d4d946094 Mon Sep 17 00:00:00 2001 From: nfpappas-oddball <165396779+nfpappas-oddball@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:48:32 -0400 Subject: [PATCH] Issue 15952 deploy pipeline (#551) Co-authored-by: nfpappas-oddball --- .github/workflows/content-release.yml | 13 ++++++++++++- .github/workflows/recurring-release.yml | 15 +++++++++++++++ .github/workflows/release-on-push.yml | 12 +++++------- release-on-push.yml | 13 +++++++++++++ 4 files changed, 45 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/recurring-release.yml create mode 100644 release-on-push.yml diff --git a/.github/workflows/content-release.yml b/.github/workflows/content-release.yml index cfa37e697..264dee4e9 100644 --- a/.github/workflows/content-release.yml +++ b/.github/workflows/content-release.yml @@ -230,7 +230,18 @@ jobs: env: SRC: ./out/ DEST: s3://next-content.www.va.gov - + + - if: inputs.build_type =='stgprod' + name: Deploy to staging and prod + run: | + cd main + ./scripts/github-actions/deploy.sh -s $SRC -d $DEST -v + ./scripts/github-actions/deploy.sh -s $SRC -d $DEST2 -v + env: + SRC: ./out/ + DEST: s3://next-content.staging.va.gov + DEST2: s3://next-content.dev.va.gov + - name: Export deploy end time id: export-deploy-end-time run: echo DEPLOY_END_TIME=$(date +"%s") >> $GITHUB_OUTPUT diff --git a/.github/workflows/recurring-release.yml b/.github/workflows/recurring-release.yml new file mode 100644 index 000000000..86792ea9d --- /dev/null +++ b/.github/workflows/recurring-release.yml @@ -0,0 +1,15 @@ +name: recurring release +on: + workflow_dispatch: + + schedule: + - cron: "*/30 8-20 * * 1-5" # run a build to prod every 30 minutes from 8am to 8pm monday to friday + +jobs: + content-release: + uses: department-of-veterans-affairs/next-build/.github/workflows/content-release.yml@main + with: + build_type: "prod" + secrets: inherit + + diff --git a/.github/workflows/release-on-push.yml b/.github/workflows/release-on-push.yml index 6dc25c86c..9a87cd222 100644 --- a/.github/workflows/release-on-push.yml +++ b/.github/workflows/release-on-push.yml @@ -2,16 +2,14 @@ name: release on push on: push: # build anytime there is a push to main branches: - - main + - main workflow_dispatch: - schedule: - - cron: "*/30 8-20 * * 1-5" - jobs: content-release: - uses: department-of-veterans-affairs/next-build/.github/workflows/projects/next-build/.github/workflows/content-release.yml@main + uses: department-of-veterans-affairs/next-build/.github/workflows/content-release.yml@main with: - build_type: "PROD" - runs-on: ubuntu-latest + build_type: "stgprod" + secrets: inherit + diff --git a/release-on-push.yml b/release-on-push.yml new file mode 100644 index 000000000..b512cc987 --- /dev/null +++ b/release-on-push.yml @@ -0,0 +1,13 @@ +name: recurring release +on: + workflow_dispatch: + + schedule: + - cron: '*/30 8-20 * * 1-5' + +jobs: + content-release: + uses: department-of-veterans-affairs/next-build/.github/workflows/content-release.yml@main + with: + build_type: 'PROD' + secrets: inherit