Skip to content

Improve workflow performance of GitHub Actions for Node.js App Service #24449

Closed as not planned
@horihiro

Description

@horihiro

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service

What part(s) of the article would you like to see updated?

The configuration has a possibility which makes GitHub Actions slower because the workflow uploads many files as an artifact which are installed by npm install.

So let me suggest the following to improve the GitHub Actions performance:

  1. Add npm prune --production command after npm run test --if-present to remove files installed as devDependencies modules and which are unnecessary for production environment
  2. Add zip command step (like zip release.zip ./* -qr) to archive deployment files before upload artifact step, and change upload artifact step in build job and Deploy to Azure Web App step in deploy job to use the zip file

The workflow applied the above improving points to is:
https://github.com/horihiro/20220504-githubactions-test/blob/main/.github/workflows/main_app-githubactions-test.yml

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionsThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamstaleThere is no recent activity on this issue or pull requestwaiting for reviewIssue/PR is waiting for a writer's review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions