Update linking syntax page #44
Workflow file for this run
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: preview-build | |
| on: | |
| pull_request: ~ | |
| workflow_call: | |
| inputs: | |
| strict: | |
| description: 'Treat warnings as errors' | |
| type: string | |
| default: 'true' | |
| continue-on-error: | |
| description: 'Do not fail to publish if build fails' | |
| type: string | |
| required: false | |
| default: 'true' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Store PR data | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| PR_REF: ${{ github.event.pull_request.head.sha }} | |
| run: | | |
| cat << EOF > pull_request.json | |
| { | |
| "number": ${PR_NUMBER}, | |
| "ref": "${PR_REF}" | |
| } | |
| EOF | |
| - name: Upload PR data | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pull-request-data | |
| path: pull_request.json | |
| if-no-files-found: error | |
| retention-days: 1 | |
| compression-level: 1 | |
| - name: Bootstrap Action Workspace | |
| if: github.repository == 'elastic/docs-builder' | |
| uses: ./.github/actions/bootstrap | |
| # we run our artifact directly please use the prebuild | |
| # elastic/docs-builder@main GitHub Action for all other repositories! | |
| - name: Build documentation | |
| if: github.repository == 'elastic/docs-builder' | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| dotnet run --project src/docs-builder -- --strict --path-prefix "/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}" | |
| - name: Build documentation | |
| if: github.repository != 'elastic/docs-builder' | |
| uses: elastic/docs-builder@main | |
| continue-on-error: ${{ fromJSON(inputs.continue-on-error != '' && inputs.continue-on-error || 'false') }} | |
| with: | |
| prefix: "/${{ github.repository }}/pull/${{ github.event.pull_request.number }}" | |
| strict: ${{ fromJSON(inputs.strict != '' && inputs.strict || 'true') }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs | |
| path: .artifacts/docs/html/ | |
| if-no-files-found: error | |
| retention-days: 1 | |
| # The lower the compression-level, the faster the artifact will be uploaded. | |
| # But the size of the artifact will be larger. | |
| compression-level: 1 |