aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/docs_build.yaml
blob: 179d0668ee72fcfc76e42f9d6b6d26296ee2f681 (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
name: Build documentation

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

jobs:
  build-docs:
    concurrency:
      group: docs-build-${{ github.ref }}
      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
      - 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"}'