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