Replies: 2 comments
-
Hi @leonluoqi, The error you’re seeing is due to the use of a deprecated version of the actions/upload-artifact action in your workflow (specifically, v3). However, in your code, you are using actions/upload-pages-artifact@v2, which is correct for GitHub Pages. Here’s what you should check and do: Review Your Workflow: Make sure you are NOT using actions/upload-artifact@v3 anywhere in your workflow files or in any reusable workflows you might be calling. Search your entire repository (including other workflows, composite actions, or called workflows) for any use of actions/upload-artifact@v3 and update it to v4. YAML
YAML
|
Beta Was this translation helpful? Give feedback.
-
Your workflow is failing because something in it or in a dependency is still on the deprecated upload artifact v3. Use the current Pages actions and a valid Ruby version name: Build and Deploy Jekyll Site
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.4' # assume 3.3.x is available
bundler-cache: true
- name: Install dependencies
run: bundle install --no-deployment
- name: Build Jekyll site
run: bundle exec jekyll build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 This removes any transitive use of upload artifact v3 by moving to the latest Pages actions. I also set Ruby to a currently available version. If your project needs a different Ruby version replace 3.3.4 with the version you actually use. If this solved your issue please mark the answer as helpful so others can find it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Why are you starting this discussion?
Question
What GitHub Actions topic or product is this about?
Actions Runner
Discussion Details
need help。
Beta Was this translation helpful? Give feedback.
All reactions