fix: streamline rules for clarity and remove redundant sections #359
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check documentation build for PR | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| merge_group: | |
| permissions: | |
| contents: read | |
| env: | |
| INSTANCE: Writerside/ccs | |
| ARTIFACT: webHelpCCS2-all.zip | |
| DOCKER_VERSION: 2025.03.8312 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| artifact: ${{ steps.define-ids.outputs.artifact }} | |
| algolia_artifact: ${{ steps.define-ids.outputs.algolia_artifact }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Define instance id and artifacts | |
| id: define-ids | |
| run: | | |
| INSTANCE=${INSTANCE#*/} | |
| INSTANCE_ID_UPPER=$(echo "$INSTANCE" | tr '[:lower:]' '[:upper:]') | |
| ARTIFACT="webHelp${INSTANCE_ID_UPPER}2-all.zip" | |
| ALGOLIA_ARTIFACT="algolia-indexes-${INSTANCE_ID_UPPER}.zip" | |
| echo "artifact=$ARTIFACT" >> $GITHUB_OUTPUT | |
| echo "algolia_artifact=$ALGOLIA_ARTIFACT" >> $GITHUB_OUTPUT | |
| echo "ARTIFACT=$ARTIFACT" >> $GITHUB_ENV | |
| echo "ALGOLIA_ARTIFACT=$ALGOLIA_ARTIFACT" >> $GITHUB_ENV | |
| - name: Build docs using Writerside Docker builder | |
| uses: JetBrains/writerside-github-action@v4 | |
| with: | |
| instance: ${{ env.INSTANCE }} | |
| artifact: ${{ env.ARTIFACT }} | |
| docker-version: ${{ env.DOCKER_VERSION }} | |
| - name: Save artifact with build results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs | |
| path: | | |
| artifacts/${{ env.ARTIFACT }} | |
| artifacts/report.json | |
| artifacts/${{ env.ALGOLIA_ARTIFACT }} | |
| 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 }} |