actions / actions/deploy-pages

Error: No artifacts named "github-pages" were found for this workflow run.

Open
#305 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
953
Forks
143
Avg merge
35m
Merged PRs (30d)
1

Description

  • Was ran with debug logging on
  • Tried many solutions before coming here
  • permissions appear to be correctly set
  • steps are sequentially correct

From actions/update-pages-artifact step

##[debug]Starting: run
##[debug]Loading inputs
##[debug]Evaluating: inputs.name
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'name'
##[debug]=> 'github-pages'
##[debug]Result: 'github-pages'
...
##[debug]Artifact github-pages has been successfully uploaded, total size in bytes: 133120

From "Artifacts" section in summary

Screenshot_20240128_221843

From actions/deploy-pages

##[debug]Headers: {
##[debug]  "content-length": "16",
##[debug]  "content-type": "application/json",
##[debug]  "date": "*** GMT",
##[debug]  "x-github-backend": "Kubernetes",
##[debug]  "x-github-request-id": "***"
##[debug]}
##[debug]Body: {
##[debug]  "artifacts": []
##[debug]}
Found 0 artifact(s)
##[debug]List artifact count: 0
Error: Fetching artifact metadata failed. Is githubstatus.com reporting issues with API requests, Pages, or Actions? Please re-run the deployment at a later time.
Error: Error: No artifacts named "github-pages" were found for this workflow run. Ensure artifacts are uploaded with actions/artifact@v4 or later.
    at getArtifactMetadata (/home/runner/work/_actions/actions/deploy-pages/v4/src/internal/api-client.js:85:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Deployment.create (/home/runner/work/_actions/actions/deploy-pages/v4/src/internal/deployment.js:66:1)
    at main (/home/runner/work/_actions/actions/deploy-pages/v4/src/index.js:30:1)
Error: Error: No artifacts named "github-pages" were found for this workflow run. Ensure artifacts are uploaded with actions/artifact@v4 or later.
##[debug]Node Action run completed with exit code 1

Workflow

name: Build & Deploy Demo
on:
  workflow_dispatch:
  push:
    branches: [main]

jobs:

  build:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pages: write
      id-token: write
    steps:
      - uses: actions/checkout@v3

      - name: Set up Node.js
        uses: actions/setup-node@v3
        with:
          node-version: '20' # Use a Node.js version that supports ES Modules
          registry-url: 'https://registry.npmjs.org'

      - name: Install Dependencies
        run: yarn install

      - name: Build Package
        run: yarn build

      - name: Upload artifact
        uses: actions/upload-pages-artifact@v2
        with:
          name: 'github-pages'
          path: 'dist'

  deploy:
    runs-on: ubuntu-latest
    needs: build
    permissions:
      contents: read
      pages: write
      id-token: write
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4

❓ ❓ ❓

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the workflow shown in the issue, especially the upload-pages-artifact and deploy-pages steps, then inspect actions/deploy-pages/v4/src/internal/api-client.js and deployment.js around artifact lookup. Reproduce the run and compare the uploaded artifact details with the API response showing an empty artifact list; done means the cause of the missing artifact is identified and the deployment behavior is corrected or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.