From dc49df5d3f8503ad60a74d187d67e19a2a0effe3 Mon Sep 17 00:00:00 2001 From: Kayla Lei Date: Tue, 29 Oct 2024 16:46:51 -0400 Subject: [PATCH] retry deployment after remaking redis cache and web app --- .github/workflows/azure-deploy-f24.yml | 112 ++++++++++++------------- .github/workflows/f24_nodebb-kale.yml | 62 -------------- 2 files changed, 54 insertions(+), 120 deletions(-) delete mode 100644 .github/workflows/f24_nodebb-kale.yml diff --git a/.github/workflows/azure-deploy-f24.yml b/.github/workflows/azure-deploy-f24.yml index b4450fc626..47c2101ca9 100644 --- a/.github/workflows/azure-deploy-f24.yml +++ b/.github/workflows/azure-deploy-f24.yml @@ -1,58 +1,54 @@ -# 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 - nodebb-f24 - -on: - push: - branches: - - f24 - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true - -jobs: - lint-and-test: - uses: - ./.github/workflows/test.yaml - - build-and-deploy: - if: github.repository == 'cmu-313/nodebb-f24-team-kale' - needs: lint-and-test - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Node.js version - uses: actions/setup-node@v3 - with: - node-version: '20.17.0' - - - name: Set up NodeBB - run: | - ./nodebb setup '{"url":"https://nodebb-kale.azurewebsites.net:443", - "admin:username": "admin", - "admin:password": "${{ secrets.ADMIN_PASSWORD }}", - "admin:password:confirm": "${{ secrets.ADMIN_PASSWORD }}", - "admin:email": "rohanpadhye@cmu.edu", - "database": "redis", - "redis:host": "${{ secrets.REDIS_HOST }}", - "redis:port": "6379", - "redis:password": "${{ secrets.REDIS_PASSWORD }}" }' - - - name: Install frontend repo as a dependency for the backend repo - run: | - npm install https://github.com/CMU-313/nodebb-frontend-f24-team-kale.git - - - name: 'Deploy to Azure Web App' - id: deploy-to-webapp - uses: azure/webapps-deploy@v2 - with: - app-name: 'nodebb-kale' - slot-name: 'Production' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_E64DC192227C43C39A12BFA26DDDAFD2 }} - package: . +# 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 - nodebb-f24 + +on: + push: + branches: + - f24 + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + +jobs: + lint-and-test: + uses: + ./.github/workflows/test.yaml + + build-and-deploy: + if: github.repository == 'cmu-313/nodebb-f24-team-kale' + needs: lint-and-test + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Node.js version + uses: actions/setup-node@v3 + with: + node-version: '20.17.0' + + - name: Set up NodeBB + run: | + ./nodebb setup '{"url":"https://nodebb-kale.azurewebsites.net:443", + "admin:username": "admin", + "admin:password": "${{ secrets.ADMIN_PASSWORD }}", + "admin:password:confirm": "${{ secrets.ADMIN_PASSWORD }}", + "admin:email": "rohanpadhye@cmu.edu", + "database": "redis", + "redis:host": "${{ secrets.REDIS_HOST }}", + "redis:port": "6379", + "redis:password": "${{ secrets.REDIS_PASSWORD }}" }' + + - name: 'Deploy to Azure Web App' + id: deploy-to-webapp + uses: azure/webapps-deploy@v2 + with: + app-name: 'nodebb-kale' + slot-name: 'Production' + publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_927CB224401F49279DFD0FD92DFFE366 }} + package: . \ No newline at end of file diff --git a/.github/workflows/f24_nodebb-kale.yml b/.github/workflows/f24_nodebb-kale.yml deleted file mode 100644 index 5e1e9f78a3..0000000000 --- a/.github/workflows/f24_nodebb-kale.yml +++ /dev/null @@ -1,62 +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 - nodebb-kale - -on: - push: - branches: - - f24 - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Node.js version - uses: actions/setup-node@v3 - with: - node-version: '20.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@v3 - 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 }} - - steps: - - name: Download artifact from build job - uses: actions/download-artifact@v3 - with: - name: node-app - - - name: Unzip artifact for deployment - run: unzip release.zip - - - name: 'Deploy to Azure Web App' - id: deploy-to-webapp - uses: azure/webapps-deploy@v2 - with: - app-name: 'nodebb-kale' - slot-name: 'Production' - publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_927CB224401F49279DFD0FD92DFFE366 }} - package: .