deploy-pages
deploy-pages copied to clipboard
Error: No artifacts named "github-pages" were found for this workflow run.
- 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
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
:question: :question: :question:
👋
You are using our latest deploy-pages
Actions (v4) which leverage the new Actions Artifact feature. Just try to also update upload-pages-artifact
to the latest (which is v3).
I have the very same issue. v3 still works, v4 throws this error.
Adding config before deploy worked for me
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Configure Pages
uses: actions/configure-pages@v4
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Hmm, not sure if this is the solution, because that's what we had more or less (Just additionally actions/upload-pages-artifact@v2
between):
See https://github.com/jomjol/AI-on-the-edge-device/blob/rolling/.github/workflows/build.yaml#L421
Check out these examples: https://github.com/actions/starter-workflows/tree/main/pages