v / .github / workflows / module_docs_ci.yml
58 lines · 55 sloc · 2.21 KB · 93162641ddda0809e8e8c2da69af8b13982567ee
Raw
1name: vlib modules CI
2
3on:
4 pull_request:
5 paths:
6 - 'vlib/**.v'
7 - 'vlib/**.md'
8 - 'cmd/tools/vdoc/**.v'
9 - 'cmd/tools/vdoc/theme/**.js'
10 - 'cmd/tools/vdoc/theme/**.css'
11 - 'cmd/tools/vdoc/theme/**.svg'
12 - 'cmd/tools/vdoc/theme/**.html'
13 - '**/module_docs_ci.yml'
14 push:
15 branches:
16 - master
17 paths:
18 - 'vlib/**.v'
19 - 'vlib/**.md'
20 - 'cmd/tools/vdoc/**.v'
21 - 'cmd/tools/vdoc/theme/**.js'
22 - 'cmd/tools/vdoc/theme/**.css'
23 - 'cmd/tools/vdoc/theme/**.svg'
24 - 'cmd/tools/vdoc/theme/**.html'
25 - '**/module_docs_ci.yml'
26
27# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
28# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
29concurrency:
30 group: module_docs-${{ github.workflow }}-${{ github.ref }}
31 cancel-in-progress: ${{ !contains(github.ref, 'master')}}
32
33jobs:
34 build-module-docs:
35 runs-on: ubuntu-24.04
36 timeout-minutes: 20
37 steps:
38 - uses: actions/checkout@v6
39 - uses: ./.github/actions/cache-apt-packages-action
40 - name: Build V
41 run: make -j4 && ./v symlink
42 - name: Update packages, before running apt install
43 run: .github/workflows/disable_azure_mirror.sh && v retry -- sudo apt update -y -qq
44 - name: Install dependencies (some modules wrap C libs)
45 run: v retry -- sudo apt install --quiet -y libpq-dev
46 libsodium-dev libasound2-dev libssl-dev \
47 sqlite3 libsqlite3-dev libfreetype6-dev \
48 libx11-dev libxi-dev freeglut3-dev \
49 libgl1-mesa-dri libxcursor-dev libgl-dev libxrandr-dev libegl-dev
50 - name: Install markdown from vpm
51 run: v retry -- v install markdown
52 - name: Test v doc
53 run: VJOBS=1 ./v test cmd/tools/vdoc/
54 - name: Build module documentation and check the examples in the comments
55 run: VJOBS=1 ./v doc -m -f html -unsafe-run-examples -time vlib/
56 - name: Deploy docs to vercel
57 if: github.event_name == 'push' && github.repository == 'vlang/v' && github.ref == 'refs/heads/master'
58 run: npx vercel --confirm --prod --name vmodules --token ${{ secrets.VERCEL_TOKEN }} vlib/_docs/ || true
59