aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/docs_build.yaml
blob: 7af18434b7461c56b73cae9a820d186d2ea29563 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Build documentation

on:
  pull_request_target:
    paths: 
    - 'ydb/docs/**'

jobs:
  build-docs:
    concurrency:
      group: docs-build-${{ github.event.pull_request.number }}
      cancel-in-progress: true
    runs-on: ubuntu-latest
    steps:
      - name: Update integrated status
        shell: bash
        run: |
          curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{github.token}}" -H "X-GitHub-Api-Version: 2022-11-28" \
            https://api.github.com/repos/${{github.repository}}/statuses/${{github.event.pull_request.head.sha}} \
            -d '{"state":"pending","description":"Waiting for relevant checks to complete","context":"checks_integrated"}'
      - name: Checkout
        uses: actions/checkout@v3
        with:
          ref: ${{ github.event.pull_request.head.sha }}
      - name: Build
        uses: diplodoc-platform/docs-build-action@v3
        with:
          revision: "pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}"
          src-root: "./ydb/docs"
      - name: Update integrated status
        shell: bash
        run: |
          curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{github.token}}" -H "X-GitHub-Api-Version: 2022-11-28" \
            https://api.github.com/repos/${{github.repository}}/statuses/${{github.event.pull_request.head.sha}} \
            -d '{"state":"success","description":"All checks completed","context":"checks_integrated"}'