From 0081e3de55ed881a8eef21fbf5322eb475612d71 Mon Sep 17 00:00:00 2001 From: Razafindramanana Dimbinirina Date: Thu, 16 May 2024 09:57:18 +0300 Subject: [PATCH] docs: adding deploy --- .github/workflows/build-docs.yml | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index e4247f1..7778b1b 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -5,6 +5,10 @@ on: branches: ["main"] workflow_dispatch: +permissions: + id-token: write + pages: write + env: INSTANCE: 'Writerside/tr' ARTIFACT: 'webHelpTR2-all.zip' @@ -32,4 +36,45 @@ jobs: name: docs path: | artifacts/${{ env.ARTIFACT }} + artifacts/report.json retention-days: 7 + test: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: docs + path: artifacts + + - name: Test documentation + uses: JetBrains/writerside-checker-action@v1 + with: + instance: ${{ env.INSTANCE }} + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: [build, test] + runs-on: ubuntu-latest + steps: + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: docs + + - name: Unzip artifact + run: unzip -O UTF-8 -qq '${{ env.ARTIFACT }}' -d dir + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Package and upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: dir + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4