summaryrefslogtreecommitdiff
path: root/.github/workflows/doc.yml
blob: 81467691293c35512208a652f5e7b9a6f5ade2ca (plain)
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
36
37
38
39
40
41
42
43
name: Test and upload documentation to artifacts

on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]
  push:
    branches:
      - main
      - v[0-9]+.x-staging
      - v[0-9]+.x

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

env:
  NODE_VERSION: lts/*

permissions:
  contents: read

jobs:
  build-docs:
    if: github.event.pull_request.draft == false
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab  # v3.5.2
        with:
          persist-credentials: false
      - name: Use Node.js ${{ env.NODE_VERSION }}
        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c  # v3.6.0
        with:
          node-version: ${{ env.NODE_VERSION }}
      - name: Environment Information
        run: npx envinfo
      - name: Build
        run: NODE=$(command -v node) make doc-only
      - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce  # v3.1.2
        with:
          name: docs
          path: out/doc
      - name: Test
        run: NODE=$(command -v node) make test-doc-ci TEST_CI_ARGS="-p actions --measure-flakiness 9"