withastro / action

A GitHub Action that deploys your Astro project to GitHub Pages
Other
143 stars 31 forks source link

Actions fail after update actions/deploy-pages action to v4 #33

Closed torn4dom4n closed 6 months ago

torn4dom4n commented 6 months ago

This is my GitHub Actions:

# To get started with Astro see: https://docs.astro.build/en/getting-started
name: Deploy Astro site to Pages

on:
  push:
    branches: ['main']

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

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
  contents: read
  pages: write
  id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
  group: 'pages'
  cancel-in-progress: false

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout your repository using git
        uses: actions/checkout@v4

      - name: Install, build, and upload your site
        uses: withastro/action@v1
        with:
          node-version: 20

  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

And this is log with Deploy to GitHub Pages:

Fetching artifact metadata for github-pages in run 7264272115
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 found for workflow run 7264272[11](https://github.com/MedPocket/18-months/actions/runs/7264272115/job/19791485992#step:2:12)5. 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:24: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 found for workflow run 72642721[15](https://github.com/MedPocket/18-months/actions/runs/7264272115/job/19791485992#step:2:16). Ensure artifacts are uploaded with actions/artifact@v4 or later.