diff --git a/.github/workflows/deploy-eu-prod-web.yml b/.github/workflows/deploy-eu-prod-web.yml new file mode 100644 index 00000000000..282cea9663c --- /dev/null +++ b/.github/workflows/deploy-eu-prod-web.yml @@ -0,0 +1,47 @@ +--- +name: Deploy Web - EU Prod + +on: + workflow_dispatch: + +jobs: + azure-deploy: + name: Deploy to Azure + runs-on: ubuntu-22.04 + env: + _WEB_ARTIFACT: "web-*-cloud-euprd.zip" + steps: + - name: Login to Azure - EU Subscription + uses: Azure/login@92a5484dfaf04ca78a94597f4f19fea633851fa2 # v1.4.6 + with: + creds: ${{ secrets.AZURE_KV_EU_PRD_SERVICE_PRINCIPAL }} + + - name: Retrieve Storage Account connection string + id: retrieve-secrets + uses: bitwarden/gh-actions/get-keyvault-secrets@c86ced0dc8c9daeecf057a6333e6f318db9c5a2b + with: + keyvault: webvault-westeurope-prod + secrets: "sa-bitwarden-web-vault-dev-key-temp" + + - name: Download latest cloud asset + uses: bitwarden/gh-actions/download-artifacts@850faad0cf6c02a8c0dc46eddde2363fbd6c373a + with: + workflow: build-web.yml + path: apps/web + workflow_conclusion: success + branch: ${{ github.ref_name }} + artifacts: ${{ env._WEB_ARTIFACT }} + + - name: Unzip build asset + working-directory: apps/web + run: unzip ${{ env._WEB_ARTIFACT }} + + - name: Deploy to Azure Storage Account + working-directory: apps/web + run: | + az storage blob upload-batch --source "./build" \ + --destination '$web' \ + --account-name "bwwebvault1itgprod" \ + --connection-string "${{ steps.retrieve-secrets.outputs.sa-bitwarden-web-vault-dev-key-temp }}" \ + --overwrite \ + --no-progress diff --git a/.github/workflows/deploy-prod-web.yml b/.github/workflows/deploy-prod-web.yml deleted file mode 100644 index 144b23e390b..00000000000 --- a/.github/workflows/deploy-prod-web.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Deploy Web - EU Prod - STUB - -on: - workflow_dispatch: - -jobs: - stub-job: - name: Stub Job - runs-on: ubuntu-22.04 - steps: - - name: Stub Step - run: exit 0