From dffef73457bd19a29be12eae79d1be214094baac Mon Sep 17 00:00:00 2001 From: Shaun Lawrie Date: Wed, 20 Mar 2024 23:33:38 +1300 Subject: [PATCH] Update docs properly --- .github/workflows/publish-docs.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 065b3def..67b945d5 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -5,9 +5,6 @@ on: branches: - main -permissions: - contents: write - jobs: deploy: runs-on: ubuntu-latest @@ -15,7 +12,22 @@ jobs: if: github.repository_owner == 'ShaunLawrie' steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Build Docs + shell: pwsh + run: | + $ErrorActionPreference = "Stop" + $docsProjectRoot = "./PwshSpectreConsole.Docs" + npm ci --prefix $docsProjectRoot + if ($LASTEXITCODE -ne 0) { + throw "Failed to install npm dependencies" + } + npm run build --prefix $docsProjectRoot + if ($LASTEXITCODE -ne 0) { + throw "Failed to run npm build" + } - name: Deploy uses: cloudflare/wrangler-action@v3 with: