updated fetch URLs for the Pcs and Weather components #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # File: .github/workflows/workflow.yml | |
| name: JavaScript CI | |
| on: | |
| push: | |
| paths: | |
| - 'client/**' | |
| env: | |
| AZURE_WEBAPP_NAME: rigsnv | |
| AZURE_WEBAPP_PACKAGE_PATH: '.' # Updated to root directory | |
| NODE_VERSION: '18.x' | |
| jobs: | |
| build-and-deploy: | |
| name: Build and Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@main | |
| - name: Debug directory structure | |
| run: ls -R # List all files and directories recursively to debug the structure | |
| - name: Use Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - name: npm install, build, and test | |
| run: | | |
| # Build and test the project, then | |
| # deploy to Azure Web App. | |
| npm install | |
| npm run build --if-present | |
| npm run test --if-present | |
| working-directory: ./client # Ensure this path is correct | |
| - name: 'Deploy to Azure WebApp' | |
| uses: azure/webapps-deploy@v3 | |
| with: | |
| app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
| # Suppress warning: This secret is securely managed by GitHub Actions. | |
| publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} | |
| package: './client/dist' |