The content server has rejected the request with: InternalServerError #727
Answered
by
simonaco
FreshP0325
asked this question in
Q&A
-
Hi there, Following the official help docs to build a Next.js project on Azure Static Apps, but the GitHub Actions returned error that stopped the project to go further. The repo I used to deploy is GitHub.com/unix/unix.bio The related GitHub Actions workflow configuration is here name: Azure Static Web Apps CI/CD
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_RIVER_039A62700 }}
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/swaworkflowconfig
app_location: "/" # App source code path
api_location: "" # Api source code path - optional
output_location: "out" # Built app content directory - optional
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_POLITE_RIVER_039A62700 }}
action: "close" The error,
|
Beta Was this translation helpful? Give feedback.
Answered by
simonaco
Feb 14, 2022
Replies: 1 comment
-
@FreshP0325 to fix the build error you need to include a You can see a successful run here |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
simonaco
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@FreshP0325 to fix the build error you need to include a
build
script in your npm scripts. you could either rename theexport
script to build or add a new one"build": "npm run now-build && next export"
You can see a successful run here