Azure / webapps-deploy

Enable GitHub developers to deploy to Azure WebApps using GitHub Actions
MIT License
270 stars 193 forks source link

azure django app deployment #278

Closed Escsec closed 1 year ago

Escsec commented 1 year ago

error

Annotations

2 errors and 4 warnings
deployFailed to deploy web package to App Service. -- deployDeployment Failed with Error: Package deployment using ZIP Deploy failed. Refer logs for more details. buildNode.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout@v2, actions/setup-python@v1, actions/upload-artifact@v2Show more buildThe `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/Show more deployNode.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/download-artifact@v2Show more deployThe `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/Show more Annotations 2 errors and 4 warnings [deploy](https://github.com/Escsec/HappyStudent/actions/runs/3715387769/jobs/6301201961#step:3:957) Failed to deploy web package to App Service. [deploy](https://github.com/Escsec/HappyStudent/actions/runs/3715387769/jobs/6301201961#step:3:958) Deployment Failed with Error: Package deployment using ZIP Deploy failed. Refer logs for more details. [build](https://github.com/Escsec/HappyStudent/actions/runs/3715387769/jobs/6301201795) Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout@v2, actions/setup-python@v1, actions/upload-artifact@v2 [build](https://github.com/Escsec/HappyStudent/actions/runs/3715387769/jobs/6301201795#step:3:6) The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ [deploy](https://github.com/Escsec/HappyStudent/actions/runs/3715387769/jobs/6301201961) Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/download-artifact@v2 [deploy](https://github.com/Escsec/HappyStudent/actions/runs/3715387769/jobs/6301201961#step:2:481) The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Escsec commented 1 year ago

my work flow

name: Build and deploy Python app to Azure Web App - happywebsite

on: push: branches:

jobs: build: runs-on: ubuntu-latest

steps:
  - uses: actions/checkout@v2

  - name: Set up Python version
    uses: actions/setup-python@v1
    with:
      python-version: '3.11'

  - name: Create and start virtual environment
    run: |
      python -m venv venv
      source venv/bin/activate

  - name: Install dependencies
    run: pip install -r requirements.txt

  # Optional: Add step to run tests here (PyTest, Django test suites, etc.)

  - name: Upload artifact for deployment jobs
    uses: actions/upload-artifact@v2
    with:
      name: python-app
      path: |
        . 
        !venv/

deploy: runs-on: ubuntu-latest needs: build environment: name: 'Production' url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
  - name: Download artifact from build job
    uses: actions/download-artifact@v2
    with:
      name: python-app
      path: .

  - name: 'Deploy to Azure Web App'
    uses: azure/webapps-deploy@v2
    id: deploy-to-webapp
    with:
      app-name: 'happywebsite'
      slot-name: 'Production'
shpraka commented 1 year ago

@Escsec Can you please with latest setup-python version? https://github.com/marketplace/actions/setup-python

We have already updated the action version to use Node16.

If you're still facing issues, do share the sample app using so that we can repro and debug further.

shpraka commented 1 year ago

Closing the issue, please create new one or re-open in case of any further issues.