From 87fcd20cf53c95e6cf8020add0db44ee2d94321a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Augusto=20Elesb=C3=A3o?= Date: Tue, 21 Nov 2023 19:30:43 +0100 Subject: [PATCH] ci: fix docs publishing workflow (#113) --- .github/workflows/docs.yml | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index bda505c..4e7a499 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,15 +2,12 @@ name: Deploy docs on: - # Runs on every release + # Runs on every stable release release: - types: [released] + types: [published] -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write + # Allow manual workflow executions + workflow_dispatch: # Allow one concurrent deployment concurrency: @@ -18,11 +15,7 @@ concurrency: cancel-in-progress: true jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + build: runs-on: ubuntu-latest steps: - name: Checkout @@ -41,9 +34,24 @@ jobs: - name: Build docs run: yarn docs - name: Upload docs folder - uses: actions/upload-pages-artifact@v1 + uses: actions/upload-pages-artifact@v2 with: path: "./docs" + + deploy: + needs: build + + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2