From eaeb1a76d9e80de3ca604a2da948dfba50d4edf8 Mon Sep 17 00:00:00 2001 From: Javier Lopez Lorente Date: Wed, 25 Nov 2026 11:36:33 +0100 Subject: [PATCH] ci(docs): deploy GitHub Pages from a separate job --- .github/workflows/docs.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 10772f0..7a119ec 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,15 +16,11 @@ concurrency: cancel-in-progress: false jobs: - deploy: - name: Deploy Documentation + build: + name: Build Documentation if: github.repository == 'dnv-opensource/solarfarmer-python-sdk' runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - name: Checkout repository uses: actions/checkout@v6 @@ -85,6 +81,19 @@ jobs: with: path: site + # Deploying from a separate job avoids a race where deploy-pages lists artifacts + # before the one just uploaded is visible (actions/deploy-pages#451), and lets a + # failed deployment be re-run without uploading a duplicate artifact. + deploy: + name: Deploy Documentation + needs: build + runs-on: ubuntu-latest + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v5