-
Notifications
You must be signed in to change notification settings - Fork 653
116 lines (101 loc) · 3.77 KB
/
build-Antora-doc.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: "build Antora documentation"
on:
workflow_dispatch:
pull_request:
types: [ opened, synchronize, reopened ]
push:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can
# access it
- uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: "Checkout Vulkan-Site"
uses: actions/checkout@v3
with:
# repository: KhronosGroup/Vulkan-Site
repository: gpx1000/Vulkan-Site
path: ./Vulkan-Site
# ref: main
ref: parent-ci
submodules: recursive
- name: "Checkout antora ui"
uses: actions/checkout@v3
with:
repository: KhronosGroup/antora-ui-khronos
path: ./Vulkan-Site/antora-ui-khronos
ref: main
- name: "setup npm"
uses: actions/setup-node@v3
with:
node-version: 'latest'
cache: 'npm'
cache-dependency-path: ./Vulkan-Site/docs-site/package-lock.json
- name: "force clear the npm cache"
run: npm cache clean --force
- name: "run npm install for ui bundle"
working-directory: ./Vulkan-Site/antora-ui-khronos
run: npm install
- name: "run npm install for docs-site"
working-directory: ./Vulkan-Site/docs-site
run: npm install
- name: "ensure we have all dependencies for building/searching/highlighting"
run: |
sudo gem install rouge
sudo apt-get update
sudo apt install xorg-dev libglu1-mesa-dev
sudo apt-get install -y asciidoctor
pip install lxml
- name: "build the ui bundle"
working-directory: ./Vulkan-Site/antora-ui-khronos
run: |
npx update-browserslist-db@latest
./node_modules/gulp/bin/gulp.js --version
./node_modules/gulp/bin/gulp.js bundle
- name: "copy ui-bundle.zip to vulkan-site"
run: cp ./Vulkan-Site/antora-ui-khronos/build/ui-bundle.zip ./Vulkan-Site/docs-site/
- name: "prepare samples"
run: cmake -H"." -B"build/unix" -DVKB_GENERATE_ANTORA_SITE=ON
- name: "build (npx) with stacktrace"
working-directory: ./Vulkan-Site/docs-site
run: |
output="$(npx antora --log-level=error --log-format=json antora-parent-ci-playbook.yml --stacktrace | \
grep -Pzo '\{(?>[^\{\}]|(?R))*\}' 2>/dev/null | \
jq 'del(."time",."file",."source",."name")' | \
jq 'select(."msg" | contains(" not found: guide:ROOT:INDEX.adoc")| not)' | \
jq 'select(."msg" | contains(" not found: guide:ROOT:index.adoc") | not)' | \
jq 'select(."msg" | contains(" not found: tutorial:ROOT:00_Introduction.adoc") | not)' | \
jq 'select(."msg" | contains(" not found: guide::hlsl.adoc") | not)' | \
jq 'select(."msg" | contains(" not found: guide::high_level_shader_language_comparison.adoc") | not)' \
)"
if [[ -n $output ]]
then
printf -- "%s\n" "$output"
exit 1
fi
# touch build/site/.nojekyll
# Deployment job
# deploy:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# permissions:
# contents: write
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# uses: peaceiris/actions-gh-pages@v4
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./Vulkan-Site/docs-site/build/site
#