Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 555 Vote(s) - 3.48 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to archive files in artifact for github workflow actions in order to fix this warning?

#1
There are over 10,000 files in this artifact, consider creating an archive before upload to improve the upload performance.
Reply

#2
You can zip all the files using below command and then upload the zip folder as your artifacts.

```
zip artifact.zip <generated_files>/*
```
Reply

#3
I had this issue deploying a node app to Azure App Services.

I fixed it by adding a zip and an unzip step.

zip step is

- name: Zip artifact for deployment
run: zip release.zip ./* -r

unzip step is

- name: unzip artifact for deployment
run: unzip release.zip


Add the zip step after the build step and before Upload artifact step like this

- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run test --if-present

- name: Zip artifact for deployment
run: zip release.zip ./* -r

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: node-app
path: release.zip



Then the unzip step is added after the download artifact step and before the deploy step like this.

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

- name: unzip artifact for deployment
run: unzip release.zip

- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:


Reply

#4
I also faced this issue when deploying a react based app to Azure App service.

To add to the answer written by @steve, If the App service instance is windows based, one can use Powershell's *Compress-Archive*.

**In build steps - zipping**

Compress-Archive . release.zip

**In deploy steps - unzipping**

Expand-Archive release.zip
or

unzip release.zip
if the deployment script is using bash

Reply

#5
I found on my case, I was using a windows hosting environment, and found the easy solution was adding the "./dist" (my output dir) instead of "." (no quotes in the file) so that it did not archive the node_modules folder. It still has an install and build command, but i've removed test, and altered this line. Mine now deploys in about 1 minute. I'm not certain what the ramifications of not archiving everything is with these artifacts as i'm new to Git, but this was able to resolve my issue, in the event someone else "just needs to get something hosted or else" as well. See code:
```
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: node-app
path: ./dist
```
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through