Giter Site home page Giter Site logo

Comments (7)

yoannchaudet avatar yoannchaudet commented on July 17, 2024 2

@rikhuijzer Thanks for spending the time to get some details!

We do a bit more validation than the error message implies (will look into fixing that so it's clear what's going on).

Here is what's tripping your deployment:

Tarball contains file without 'read other' permission ./.lock

We talk about permissions and provide some ways to fix that in:

https://github.com/actions/upload-pages-artifact?tab=readme-ov-file#file-permissions

from deploy-pages.

yoannchaudet avatar yoannchaudet commented on July 17, 2024

Can you point us at a workflow run maybe where you see this error?

from deploy-pages.

rikhuijzer avatar rikhuijzer commented on July 17, 2024

Yes. Thanks for reaching out, @yoannchaudet, and my apologies for not providing anything to work with. To make it up to you all, I put in some extra effort and made a minimal reproducible example at https://github.com/rikhuijzer/deploy-pages-mwe.

The repository contains a minimal Rust project and attempts to deploy the docs via actions/upload-pages-artifact@v3 and actions/deploy-pages@v4.

This is the full workflow, which should work for any simple Rust project:

name: docs

on:
  push:
    branches:
      - main
  pull_request:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Setup Stable Rust
        uses: dtolnay/rust-toolchain@v1
        with:
          toolchain: 'stable'

      - name: Build docs and manually add an index.html file
        run: |
          cargo doc --all --no-deps
          echo '<meta http-equiv="refresh" content="0; url=mwe">' > target/doc/index.html

      - uses: actions/upload-pages-artifact@v3
        if: ${{ github.event_name != 'pull_request' }}
        with:
          path: './target/doc'
          retention-days: '1'

  deploy:
    # Separate step to keep the permissions separated.
    needs: build
    if: ${{ github.event_name != 'pull_request' }}
    permissions:
      contents: read
      pages: write
      id-token: write
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    steps:
      - id: deployment
        uses: actions/deploy-pages@v4

This is the error:

> Run actions/deploy-pages@v4
Fetching artifact metadata for "github-pages" in this workflow run
Found 1 artifact(s)
Creating Pages deployment with payload:
{
	"artifact_id": 1188542064,
	"pages_build_version": "6fed36452144f63332d81e8929a89f5f5a3a425d",
	"oidc_token": "***"
}
Created deployment for 6fed36452144f63332d81e8929a89f5f5a3a425d, ID: 6fed36452144f63332d81e8929a89f5f5a3a425d
Getting Pages deployment status...
Error: Artifact could not be deployed. Please ensure the content does not contain any hard links, symlinks and total size is less than 10GB.

In another repository, I could easily fix the error by switching to deploying the pages via a gh-pages branch instead of actions/deploy-pages (For more details about that see https://github.com/poweranalyses-org/rmathlib/commits/main/ and scroll down a bit to see the failing CI runs near commit 2212240227088ce15d283851e4007aa3c14efb75).

from deploy-pages.

rikhuijzer avatar rikhuijzer commented on July 17, 2024

And this is the file tree for the generated artifact:

$ tree artifact/
artifact/
├── crates.js
├── help.html
├── index.html
├── mwe
│   ├── all.html
│   ├── fn.plus_one.html
│   ├── index.html
│   └── sidebar-items.js
├── search-index.js
├── settings.html
├── src
│   └── mwe
│       └── lib.rs.html
├── src-files.js
└── static.files
    ├── COPYRIGHT-23e9bde6c69aea69.txt
    ├── FiraSans-LICENSE-db4b642586e02d97.txt
    ├── FiraSans-Medium-8f9a781e4970d388.woff2
    ├── FiraSans-Regular-018c141bf0843ffd.woff2
    ├── LICENSE-APACHE-b91fa81cba47b86a.txt
    ├── LICENSE-MIT-65090b722b3f6c56.txt
    ├── NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2
    ├── NanumBarunGothic-LICENSE-18c5adf4b52b4041.txt
    ├── SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2
    ├── SourceCodePro-LICENSE-d180d465a756484a.txt
    ├── SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2
    ├── SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2
    ├── SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2
    ├── SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2
    ├── SourceSerif4-LICENSE-3bb119e13b1258b7.md
    ├── SourceSerif4-Regular-46f98efaafac5295.ttf.woff2
    ├── clipboard-7571035ce49a181d.svg
    ├── favicon-16x16-8b506e7a72182f1c.png
    ├── favicon-2c020d218678b618.svg
    ├── favicon-32x32-422f7d1d52889060.png
    ├── main-9dd44ab47b99a0fb.js
    ├── normalize-76eba96aa4d2e634.css
    ├── noscript-5d8b3c7633ad77ba.css
    ├── rust-logo-151179464ae7ed46.svg
    ├── rustdoc-9ee3a5e31a2afa3e.css
    ├── scrape-examples-ef1e698c1d417c0c.js
    ├── search-8fbf244ebcf71464.js
    ├── settings-74424d7eec62a23e.js
    ├── src-script-3280b574d94e47b4.js
    ├── storage-fec3eaa3851e447d.js
    └── wheel-7b819b6101059cd0.svg

5 directories, 42 files

I also manually confirmed via ls -ahlv that none of these files seems to be a hard link or a symlink. Also, the file size is only about 1 MB which is well below 10 GB that the error talks about.

from deploy-pages.

dhardy avatar dhardy commented on July 17, 2024

I hit this too; luckily I found this issue since the error message is not helpful.

The simplest fix appears to be just to delete the .lock file:

rm target/doc/.lock

from deploy-pages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.