From c650cdadeb772ea39d490198d33528171a484367 Mon Sep 17 00:00:00 2001 From: Alex Urbina Date: Wed, 22 Nov 2023 17:54:01 -0600 Subject: [PATCH] DEVOPS-1581 REFACTOR: Deployment workflow to remove CloudFlare Pages deployment --- .github/workflows/deploy-non-prod-web.yml | 88 ----------------------- 1 file changed, 88 deletions(-) diff --git a/.github/workflows/deploy-non-prod-web.yml b/.github/workflows/deploy-non-prod-web.yml index 72d0fc2da8..0cd138f564 100644 --- a/.github/workflows/deploy-non-prod-web.yml +++ b/.github/workflows/deploy-non-prod-web.yml @@ -95,94 +95,6 @@ jobs: ref: ${{ github.ref_name }} wait_interval: 100 - cfpages-deploy: - name: Deploy Web Vault to ${{ inputs.environment }} CloudFlare Pages branch - if : ${{ inputs.environment == 'QA' }} - needs: - - setup - - artifact-check - runs-on: ubuntu-22.04 - env: - _ENVIRONMENT: ${{ needs.setup.outputs.environment }} - _ENVIRONMENT_URL: ${{ needs.setup.outputs.environment-url }} - _ENVIRONMENT_NAME: ${{ needs.setup.outputs.environment-name }} - _ENVIRONMENT_BRANCH: ${{ needs.setup.outputs.environment-branch }} - _ENVIRONMENT_ARTIFACT: ${{ needs.setup.outputs.environment-artifact }} - steps: - - name: Create GitHub deployment - uses: chrnorm/deployment-action@d42cde7132fcec920de534fffc3be83794335c00 # v2.0.5 - id: deployment - with: - token: '${{ secrets.GITHUB_TOKEN }}' - initial-status: 'in_progress' - environment-url: ${{ env._ENVIRONMENT_URL }} - environment: ${{ env._ENVIRONMENT_NAME }} - description: 'Deployment from branch ${{ github.ref_name }}' - - - name: Checkout Repo - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - - name: Download latest cloud asset - uses: bitwarden/gh-actions/download-artifacts@main - with: - workflow: build-web.yml - path: apps/web - workflow_conclusion: success - branch: ${{ github.ref_name }} - artifacts: ${{ env._ENVIRONMENT_ARTIFACT }} - - - name: Unzip cloud asset - working-directory: apps/web - run: unzip ${{ env._ENVIRONMENT_ARTIFACT }} - - - name: Checkout Repo - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - with: - ref: ${{ env._ENVIRONMENT_BRANCH }} - path: deployment - - - name: Setup git config - run: | - git config --global user.name "GitHub Action Bot" - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --global url."https://github.com/".insteadOf ssh://git@github.com/ - git config --global url."https://".insteadOf ssh:// - - - name: Deploy CloudFlare Pages - run: | - rm -rf ./* - cp -R ../apps/web/build/* . - working-directory: deployment - - - name: Push new ver to ${{ env._ENVIRONMENT_BRANCH }} - run: | - if [ -n "$(git status --porcelain)" ]; then - git add . - git commit -m "Deploy ${{ github.ref_name }} to ${{ env._ENVIRONMENT }} Cloudflare pages" - git push -u origin ${{ env._ENVIRONMENT_BRANCH }} - else - echo "No changes to commit!"; - fi - working-directory: deployment - - - name: Update deployment status to Success - if: ${{ success() }} - uses: chrnorm/deployment-status@2afb7d27101260f4a764219439564d954d10b5b0 # v2.0.1 - with: - token: '${{ secrets.GITHUB_TOKEN }}' - environment-url: ${{ env._ENVIRONMENT_URL }} - state: 'success' - deployment-id: ${{ steps.deployment.outputs.deployment_id }} - - - name: Update deployment status to Failure - if: ${{ failure() }} - uses: chrnorm/deployment-status@2afb7d27101260f4a764219439564d954d10b5b0 # v2.0.1 - with: - token: '${{ secrets.GITHUB_TOKEN }}' - environment-url: ${{ env._ENVIRONMENT_URL }} - state: 'failure' - deployment-id: ${{ steps.deployment.outputs.deployment_id }} - azure-deploy: name: Deploy Web Vault to ${{ inputs.environment }} Storage Account needs: