diff --git a/.github/workflows/main_secure-vault.yml b/.github/workflows/main_secure-vault.yml deleted file mode 100644 index 8cb39c0..0000000 --- a/.github/workflows/main_secure-vault.yml +++ /dev/null @@ -1,74 +0,0 @@ -# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy -# More GitHub Actions for Azure: https://github.com/Azure/actions - -name: Build and deploy Node.js app to Azure Web App - secure-vault - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read #This is required for actions/checkout - - steps: - - uses: actions/checkout@v4 - - - name: Set up Node.js version - uses: actions/setup-node@v3 - with: - node-version: '22.x' - - - name: npm install, build, and test - run: | - npm install - npm run build --if-present - npm run test --if-present - - - name: Zip artifact for deployment - run: zip release.zip ./* -r - - - name: Upload artifact for deployment job - uses: actions/upload-artifact@v4 - with: - name: node-app - path: release.zip - - deploy: - runs-on: ubuntu-latest - needs: build - environment: - name: 'Production' - url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} - permissions: - id-token: write #This is required for requesting the JWT - contents: read #This is required for actions/checkout - - steps: - - name: Download artifact from build job - uses: actions/download-artifact@v4 - with: - name: node-app - - - name: Unzip artifact for deployment - run: unzip release.zip - - - name: Login to Azure - uses: azure/login@v2 - with: - client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_D3FECC5B17B04367A08C4C35A0702616 }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_3E833029F8E04EA78E699FA096CE6A17 }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_ADCC57DD397C4943BCBB647F8EA79B1A }} - - - name: 'Deploy to Azure Web App' - id: deploy-to-webapp - uses: azure/webapps-deploy@v3 - with: - app-name: 'secure-vault' - slot-name: 'Production' - package: . - \ No newline at end of file diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 768b781..3028a8c 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -13,23 +13,17 @@ on: jobs: # 1. SonarCloud Analysis Job sonarcloud-analysis: + name: SonarQube Analysis runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/checkout@v4 with: - node-version: '20.x' - - - name: Install dependencies - run: npm install - working-directory: ./client - - - name: Run SonarCloud analysis - uses: SonarSource/sonarcloud-github-action@4006f663ecaf1f8093e8e4abb9227f6041f52216 + fetch-depth: 0 + + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v5 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: @@ -40,7 +34,8 @@ jobs: # 2. Express App Hosting Job (depends on SonarCloud success, but only runs on push to `main`) - express-deployment: + express-build: + name: Express Build runs-on: ubuntu-latest needs: sonarcloud-analysis if: github.ref == 'refs/heads/main' @@ -69,9 +64,10 @@ jobs: # 3. Deploy to Azure Web App (depends on Express app deployment success) - deploy-to-azure: + express-deployment: + name: Express Deployment runs-on: ubuntu-latest - needs: express-deployment + needs: express-build environment: name: 'Production' url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} @@ -91,9 +87,9 @@ jobs: - name: Login to Azure uses: azure/login@v2 with: - client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E50E2B172F2A4C83B498DFFF0F3BA19B }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_5C92EA594F3548D9B537751239275D14 }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_3FC292CDD1DB4032B184C9B43ABDAB1C }} + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_D3FECC5B17B04367A08C4C35A0702616 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_3E833029F8E04EA78E699FA096CE6A17 }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_ADCC57DD397C4943BCBB647F8EA79B1A }} - name: 'Deploy to Azure Web App' id: deploy-to-webapp @@ -105,9 +101,10 @@ jobs: # 4. React App Hosting to Cloudflare (depends on Azure Web App deployment success) - react-deployment: + ui-deployment: + name: UI Deployment runs-on: ubuntu-latest - needs: deploy-to-azure + needs: express-deployment if: github.ref == 'refs/heads/main' steps: @@ -119,7 +116,9 @@ jobs: working-directory: ./client - name: Build React app - run: npm run build + run: | + echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" >> .env + npm run build working-directory: ./client - name: Deploy to Cloudflare Pages diff --git a/client/src/pages/vault/Vault.css b/client/src/pages/vault/Vault.css index f57995c..5a2acb2 100644 --- a/client/src/pages/vault/Vault.css +++ b/client/src/pages/vault/Vault.css @@ -13,6 +13,7 @@ } .vault-table-cell { + padding: 3px 10px !important; text-align: center !important; button {