Bump @tootallnate/once and jest-environment-jsdom in /src/web #1328
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
| name: Build | |
| #concurrency: deploy | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| - "release" | |
| pull_request: | |
| branches: | |
| - "main" | |
| schedule: | |
| - cron: "0 4 * * 0" | |
| env: | |
| AZURE_NEXTJS_WEBAPP_NAME: 'RobertLynJANext' | |
| AZURE_WEBAPP_PACKAGE_PATH: './' | |
| WEB_WORKING_DIRECTORY: './src/react' | |
| API_WORKING_DIRECTORY: './src/API' | |
| AZURE_API_WEBAPP_NAME: 'RobertLynJAApi' | |
| DEPLOY: ${{ github.event_name == 'push' }} | |
| jobs: | |
| build-web: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Lowercase the repo name | |
| run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | |
| - name: Build and push container image to registry | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: ${{ env.DEPLOY }} | |
| tags: ghcr.io/${{ env.REPO }}-web:${{ github.sha }} | |
| file: ${{ env.WEB_WORKING_DIRECTORY }}/Dockerfile | |
| deploy-web: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} | |
| needs: [build-web, build-api] | |
| environment: | |
| name: 'Production' | |
| url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
| steps: | |
| - name: Lowercase the repo name | |
| run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | |
| - name: Deploy to Azure Web App | |
| id: deploy-to-webapp | |
| uses: azure/webapps-deploy@657f0700ea5214d56a0400d8ac5e8023c963d25d | |
| with: | |
| app-name: ${{ env.AZURE_NEXTJS_WEBAPP_NAME }} | |
| publish-profile: ${{ secrets.AZURE_NEXTJS_PUBLISH_PROFILE_D }} | |
| images: 'ghcr.io/${{ env.REPO }}-web:${{ github.sha }}' | |
| build-api: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GitHub container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Lowercase the repo name | |
| run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | |
| - name: Build and push container image to registry | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: ${{ env.DEPLOY }} | |
| tags: ghcr.io/${{ env.REPO }}-api:${{ github.sha }} | |
| file: ${{ env.API_WORKING_DIRECTORY }}/Dockerfile | |
| deploy-api: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} | |
| needs: [build-web, build-api] | |
| environment: | |
| name: 'Production' | |
| url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | |
| steps: | |
| - name: Lowercase the repo name | |
| run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | |
| - name: Deploy to Azure Web App | |
| id: deploy-to-webapp | |
| uses: azure/webapps-deploy@657f0700ea5214d56a0400d8ac5e8023c963d25d | |
| with: | |
| app-name: ${{ env.AZURE_API_WEBAPP_NAME }} | |
| publish-profile: ${{ secrets.AZURE_API_PUBLISH_PROFILE_D }} | |
| images: 'ghcr.io/${{ env.REPO }}-api:${{ github.sha }}' |