最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

github - Error: Artifact could not be deployed. Please ensure the content does not contain any hard links, symlinks and total si

programmeradmin0浏览0评论

This is driving me nuts.

I have this .github/workflows/build.yml file in my repo which is an eleventy static website.

name: Build Eleventy
on:
  # Runs on pushes targeting the default branch
  push:
    branches: ["master"]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

permissions:
  contents: write
  pages: write
  id-token: write

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Use Node.js >= 14.x
        uses: actions/setup-node@v4
        with:
          node-version: 20.x

      - name: install dependencies
        run: npm ci

      - name: clean up
        run: npm run clean

      - name: run eleventy
        run: npm run build

      - name: fix permissions
        run: chmod -R a+rX ./_site

      - name: upload static site content
        uses: actions/upload-artifact@v4

        with:
          path: ./_site
          name: github-pages
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4 

I recently had to upgrade to v4 (as mentioned there)

Everything seems to go well on the build job, but when I move to the deploy job, I get:

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": 2530520985,
    "pages_build_version": "bed7ba4b96e741349c7da1255fa20a1ac5d1acb1",
    "oidc_token": "***"
}
Created deployment for bed7ba4b96e741349c7da1255fa20a1ac5d1acb1, ID: bed7ba4b96e741349c7da1255fa20a1ac5d1acb1
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.

What's the problem?

Neither google nor chatGPT will help this time. :'(

Thanks

This is driving me nuts.

I have this .github/workflows/build.yml file in my repo which is an eleventy static website.

name: Build Eleventy
on:
  # Runs on pushes targeting the default branch
  push:
    branches: ["master"]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

permissions:
  contents: write
  pages: write
  id-token: write

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Use Node.js >= 14.x
        uses: actions/setup-node@v4
        with:
          node-version: 20.x

      - name: install dependencies
        run: npm ci

      - name: clean up
        run: npm run clean

      - name: run eleventy
        run: npm run build

      - name: fix permissions
        run: chmod -R a+rX ./_site

      - name: upload static site content
        uses: actions/upload-artifact@v4

        with:
          path: ./_site
          name: github-pages
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4 

I recently had to upgrade to v4 (as mentioned there)

Everything seems to go well on the build job, but when I move to the deploy job, I get:

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": 2530520985,
    "pages_build_version": "bed7ba4b96e741349c7da1255fa20a1ac5d1acb1",
    "oidc_token": "***"
}
Created deployment for bed7ba4b96e741349c7da1255fa20a1ac5d1acb1, ID: bed7ba4b96e741349c7da1255fa20a1ac5d1acb1
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.

What's the problem?

Neither google nor chatGPT will help this time. :'(

Thanks

Share Improve this question asked Feb 3 at 23:20 Augustin RiedingerAugustin Riedinger 22.3k32 gold badges146 silver badges219 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 3

Use actions/upload-pages-artifact@v3 instead of actions/upload-artifact@v4 in upload artifact step. I was facing the exactly same issue. For more details see this github comment

Hello!

Try using actions/upload-pages-artifact instead of actions/upload-artifact.

This will take care of prepping your files in the right format for GitHub Pages.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论