Github Action -> Azure Deployment: Error: WARNING: You are using pip version 20.2.1; however, version 21.1.3 is available.

鼎元 陈 1 Reputation point
2021-07-14T09:47:55.293+00:00

I am learning this Exercise :
But at the step of create new azure static web app resource, I meet an error, how I solve it?

My code:

env:
AZURE_WEBAPP_PACKAGE_PATH: '.'

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: Install dependencies
    run: |
    python -m pip install --upgrade pip
    pip install -r requirements.txt
  • 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_THANKFUL_OCEAN_02C3A6F00 }}
    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: "" # Built app content directory - optional
    ###### End of Repository/Build Configurations ######

Error Log:

Run python -m pip install --upgrade pip  
  python -m pip install --upgrade pip  
  pip install -r requirements.txt  
  shell: /usr/bin/bash -e {0}  
  env:  
    AZURE_WEBAPP_PACKAGE_PATH: .  
Collecting pip  
  Downloading pip-21.1.3-py3-none-any.whl (1.5 MB)  
Installing collected packages: pip  
Successfully installed pip-21.1.3  
Defaulting to user installation because normal site-packages is not writeable  




14s  
Run Azure/static-web-apps-deploy@v1  
/usr/bin/docker run --name a33c1dc07e96a1f33431ab4e4caaaead92bf0_7f6461 --label 8a33c1 --workdir /github/workspace --rm -e AZURE_WEBAPP_PACKAGE_PATH -e INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN -e INPUT_REPO_TOKEN -e INPUT_ACTION -e INPUT_APP_LOCATION -e INPUT_API_LOCATION -e INPUT_OUTPUT_LOCATION -e INPUT_API_BUILD_COMMAND -e INPUT_APP_ARTIFACT_LOCATION -e INPUT_APP_BUILD_COMMAND -e INPUT_ROUTES_LOCATION -e INPUT_SKIP_APP_BUILD -e INPUT_CONFIG_FILE_LOCATION -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/StaicWebApp/StaicWebApp":"/github/workspace" 8a33c1:dc07e96a1f33431ab4e4caaaead92bf0  
DeploymentId: ac39aa37-8d60-4351-b76f-4b938cda99e1  

App Directory Location: '/' was found.  
No Api directory specified. Azure Functions will not be created.  
Starting to build app with Oryx  
Azure Static Web Apps utilizes Oryx to build both static applications and Azure Functions. You can find more details on Oryx here: https://github.com/microsoft/Oryx  
---Oryx build logs---  


Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx  
You can report issues at https://github.com/Microsoft/Oryx/issues  

Oryx Version: 0.2.20210410.1, Commit: e73613ae1fd73c809c00f357f8df91eb984e1158, ReleaseTagName: 20210410.1  

Build Operation ID: |XIkpViBK+Z4=.ec7ffd14_  
Repository Commit : 6826edfe429c2a9ca21c81cbe3fd5920f7ac230f  

Detecting platforms...  
Detected following platforms:  
  python: 3.8.6  
Version '3.8.6' of platform 'python' is not installed. Generating script to install it...  


Source directory     : /github/workspace  
Destination directory: /bin/staticsites/ss-oryx/app  


Downloading and extracting 'python' version '3.8.6' to '/tmp/oryx/platforms/python/3.8.6'...  
Downloaded in 3 sec(s).  
Verifying checksum...  
Extracting contents...  
Done in 5 sec(s).  

Python Version: /tmp/oryx/platforms/python/3.8.6/bin/python3.8  
Python Virtual Environment: pythonenv3.8  
Creating virtual environment...  
Activating virtual environment...  
Running pip install...  
WARNING: You are using pip version 20.2.1; however, version 21.1.3 is available.  
You should consider upgrading via the '/github/workspace/pythonenv3.8/bin/python -m pip install --upgrade pip' command.  
Preparing output...  

Copying files to destination directory '/bin/staticsites/ss-oryx/app'...  
Done in 0 sec(s).  

Removing existing manifest file  
Creating a manifest file...  
Manifest file created.  

Done in 8 sec(s).  


---End of Oryx build logs---  
Oryx built the app folder but was unable to determine the location of the app artifacts. Please specify the app artifact location through the GitHub workflow file.  

For further information, please visit the Azure Static Web Apps documentation at https://learn.microsoft.com/en-us/azure/static-web-apps/  
If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/  
Exiting  
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,326 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 26,946 Reputation points Microsoft Employee
    2021-07-15T14:18:21.947+00:00

    Hi @鼎元 陈 ,

    The following...

    WARNING: You are using pip version 20.2.1; however, version 21.1.3 is available.

    ...on line 57 isn't an error. I reviewed your log snippet above and there aren't any errors that would've prevented your site from being deployed and running. Your task -name: Install dependencies does upgrade pip on build agent, not the app service host. You're seeing the warning as output from task -name: Build and deploy. If you have any questions or can't hit your site, please do comment down below.

    1 person found this answer helpful.