From 003e86953b167cbdc989aeb58dae86c3fc9b1a88 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Sat, 23 Aug 2025 23:23:23 +0200 Subject: [PATCH] fix: move pages deployment to deploy workflow --- .github/workflows/build.yml | 11 +---------- .github/workflows/deploy.yml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae6b321a..446f6214 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,8 +8,6 @@ name: Build permissions: contents: read - pages: write - id-token: write on: push: @@ -54,11 +52,4 @@ jobs: with: name: website-build-${{ github.run_id }} path: ${{ env.BUILD_PATH }} - retention-days: 1 - - # Upload for GitHub Pages (main branch only) - - name: Upload Pages artifact - if: github.ref == 'refs/heads/main' - uses: actions/upload-pages-artifact@v3 - with: - path: ${{ env.BUILD_PATH }} \ No newline at end of file + retention-days: 1 \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 141387c2..928f6c85 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -74,6 +74,19 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: + - name: Download build artifact + uses: actions/download-artifact@v4 + with: + name: website-build-${{ github.event.workflow_run.id }} + path: website-build + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ github.token }} + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: website-build + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4