You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to deploy a Retype app to Azure Static Web Apps using GitHub Actions. Retype is a tool that generates websites from Markdown files. However, I get the following error during the deployment:
The size of the function content was too large. The limit for this Static Web App is 104857600 bytes.
I have done research on the issue, and most other Q&A posts are related to Next.js or some other language that I am not using. Thus, I created a new post because none of the other information has been relevant.
I checked the size of my wwwroot folder, which contains the output of the Retype build, and it is about 50 MB (according to Windows Explorer). Also, the whole repo (in WinEx) is 90 MB.
I also checked the quotas for Azure Static Web Apps, and it says that the maximum size per app is 250 MB (free plan) and 500 MB (standard plan). We changed from the free to the standard plan to attempt to fix the problem, but nothing changed.
So, I have two questions:
Am I correct in assuming that I should be able to create a Static Web App with a size of 250 MB like the documentation quota describes? Or, is there something that I am missing or misunderstanding that causes the quota to be lower and I can really only use 100 MB as my error describes?
If I should be able to use 250 MB (or 500 MB), how can I achieve this?
I have tried some of the solutions suggested in these links, such as removing the cache folder or using a bundler, but they did not work for me. Also, I'm unsure how to apply 'solutions' that are for Next.js, since my page (Retype built) doesn't use this. 123
.github/workflows code
I have two .yml files in the workflows folder. Below are the two files and some of their code.
retype-action.yml
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') || github.event_name == 'workflow_dispatch'runs-on: ubuntu-latestneeds: publishname: Build and Deploy to Azure Static Web Appssteps:
- uses: actions/checkout@v3with:
submodules: true
- name: Build And Deployid: builddeployuses: Azure/static-web-apps-deploy@v1with:
azure_static_web_apps_api_token: ${{ secrets.[AZURE SECRET] }}repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e., PR comments)action: "upload"###### Repository/Build Configurations - These values can be configured to match your app requirements. ####### For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfigapp_location: "/wwwroot/"# App source code pathapi_location: "/"# Api source code path - optionaloutput_location: ""# Built app content directory - optionalapp_build_command: 'npm run build-ui-prod'api_build_command: 'npm run build-api-prod'###### End of Repository/Build Configurations ######close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'runs-on: ubuntu-latestname: Close Pull Request Jobsteps:
- name: Close Pull Requestid: closepullrequestuses: Azure/static-web-apps-deploy@v1with:
azure_static_web_apps_api_token: ${{ secrets.[AZURE SECRET] }}action: "close"
azure...[secret].yml
name: Azure Static Web Apps CI/CDon:
workflow_dispatch:
push:
branches:
- publishedpull_request:
types: [opened, synchronize, reopened, closed]branches:
- publishedjobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') || github.event_name == 'workflow_dispatch'runs-on: ubuntu-latestname: Build and Deploy Jobsteps:
- uses: actions/checkout@v2with:
submodules: true
- name: Build And Deployid: builddeployuses: Azure/static-web-apps-deploy@v1with:
azure_static_web_apps_api_token: ${{ secrets.[AZURE SECRET] }}repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e., PR comments)action: "upload"###### Repository/Build Configurations - These values can be configured to match your app requirements. ####### For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfigapp_location: "/wwwroot/"# App source code pathapi_location: "/"# Api source code path - optionaloutput_location: ""# Built app content directory - optionalapp_build_command: 'npm run build-ui-prod'api_build_command: 'npm run build-api-prod'###### End of Repository/Build Configurations ######close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'runs-on: ubuntu-latestname: Close Pull Request Jobsteps:
- name: Close Pull Requestid: closepullrequestuses: Azure/static-web-apps-deploy@v1with:
azure_static_web_apps_api_token: ${{ secrets.[AZURE SECRET] }}action: "close"
In link 1 above, the app and API build commands were suggested as a solution, but this didn't work. The suggestion was:
I am trying to deploy a Retype app to Azure Static Web Apps using GitHub Actions. Retype is a tool that generates websites from Markdown files. However, I get the following error during the deployment:
I have done research on the issue, and most other Q&A posts are related to Next.js or some other language that I am not using. Thus, I created a new post because none of the other information has been relevant.
I checked the size of my wwwroot folder, which contains the output of the Retype build, and it is about 50 MB (according to Windows Explorer). Also, the whole repo (in WinEx) is 90 MB.
I also checked the quotas for Azure Static Web Apps, and it says that the maximum size per app is 250 MB (free plan) and 500 MB (standard plan). We changed from the free to the standard plan to attempt to fix the problem, but nothing changed.
So, I have two questions:
I have tried some of the solutions suggested in these links, such as removing the cache folder or using a bundler, but they did not work for me. Also, I'm unsure how to apply 'solutions' that are for Next.js, since my page (Retype built) doesn't use this. 1 2 3
.github/workflows
codeI have two
.yml
files in the workflows folder. Below are the two files and some of their code.retype-action.yml
azure...[secret].yml
In link 1 above, the app and API build commands were suggested as a solution, but this didn't work. The suggestion was:
The text was updated successfully, but these errors were encountered: