From 17ba3eb3513448db93d8f8e936ba4dc6b1f30812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20M=C5=82odzikowski?= Date: Tue, 13 Jun 2023 13:29:05 +0200 Subject: [PATCH] feat(ci): setup static on s3 (#4075) --- .github/workflows/ci-cd-trigger.yml | 19 ++++++++++++++----- .github/workflows/publish-dist.yml | 4 ++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-cd-trigger.yml b/.github/workflows/ci-cd-trigger.yml index 7ce11f714..f58b29e54 100644 --- a/.github/workflows/ci-cd-trigger.yml +++ b/.github/workflows/ci-cd-trigger.yml @@ -136,19 +136,28 @@ jobs: preview_explorer=$(printf "https://%s.%s.vega.rocks" "explorer" "$branch_slug") fi projects="$(echo $projects_e2e | sed 's|-e2e||g')" - if echo "$affected" | grep -q multisig-signer; then - echo "Tools are affected" - # tools are only applicable to check previews or deploy from develop to mainnet - if [[ "${{ github.event_name }}" = "pull_request" ]]; then + if [[ "${{ github.event_name }}" = "pull_request" ]]; then + if echo "$affected" | grep -q multisig-signer; then + echo "Tools are affected" + # tools are only applicable to check previews or deploy from develop to mainnet echo "Deploying tools on preview" preview_tools=$(printf "https://%s.%s.vega.rocks" "tools" "$branch_slug") projects+=' "multisig-signer" ' fi - if [[ "${{ github.ref }}" =~ .*develop$ ]]; then + elif [[ "${{ github.ref }}" =~ .*develop$ ]]; then + if echo "$affected" | grep -q multisig-signer; then + echo "Tools are affected" + # tools are only applicable to check previews or deploy from develop to mainnet echo "Deploying tools on s3" projects+=' "multisig-signer" ' fi + if echo "$affected" | grep -q static; then + echo "Static are affected" + echo "Deploying static on s3" + projects+=' "static" ' + fi fi + projects_e2e=${projects_e2e%?} projects_e2e=[${projects_e2e// /,}] projects=[${projects// /,}] diff --git a/.github/workflows/publish-dist.yml b/.github/workflows/publish-dist.yml index 1c0b7f4ad..127a5daf7 100644 --- a/.github/workflows/publish-dist.yml +++ b/.github/workflows/publish-dist.yml @@ -74,6 +74,10 @@ jobs: envName="mainnet" bucketName="tools.vega.xyz" fi + if [[ "${{ matrix.app }}" = "static" ]]; then + envName="mainnet" + bucketName="static.vega.xyz" + fi elif [[ "${{ github.ref }}" =~ .*main$ ]]; then envName="mainnet" elif [[ "${{ matrix.app}}" = "trading" ]] && [[ "${{ startsWith(github.ref, 'refs/tags/v') && 'true' || 'false' }}" = "true" ]]; then