From b58a343b8dff937987cf7a207688be5afe847b4e Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Thu, 1 Aug 2024 23:53:59 +0900 Subject: [PATCH] Set up documentation publishing --- .github/workflows/build-docs.yml | 47 +++++++++++++++++++++++++++++++- Writerside/writerside.cfg | 4 +-- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 0ada9e1..cde0f3c 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/hi' ARTIFACT: 'webHelpHI2-all.zip' @@ -32,4 +36,45 @@ jobs: name: docs path: | artifacts/${{ env.ARTIFACT }} - retention-days: 7 \ No newline at end of file + 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 \ No newline at end of file diff --git a/Writerside/writerside.cfg b/Writerside/writerside.cfg index 5f10ad4..6a9a3cf 100644 --- a/Writerside/writerside.cfg +++ b/Writerside/writerside.cfg @@ -2,8 +2,8 @@ - - + +