-
Notifications
You must be signed in to change notification settings - Fork 2
144 lines (118 loc) · 3.9 KB
/
ci.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Copyright 2021-2024 The Khronos Group, Inc.
# SPDX-License-Identifier: Apache-2.0
# Github CI file for Vulkan Antora Guide
name: CI
# Controls when the action will run.
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can
# access it
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: "checkout Antora UI"
uses: actions/checkout@v4
with:
repository: KhronosGroup/antora-ui-khronos
path: ./antora-ui-khronos
ref: main
submodules: recursive
- name: "checkout Vulkan Guide"
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Guide
path: ./Vulkan-Guide
ref: main
submodules: recursive
- name: "Checkout Vulkan Docs"
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Docs
path: ./Vulkan-Docs
ref: main
submodules: recursive
- name: "Checkout Vulkan Samples"
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Samples
path: ./Vulkan-Samples
ref: main
submodules: recursive
- name: "Checkout Vulkan Tutorial"
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Tutorial
path: ./Vulkan-Tutorial
ref: main
submodules: recursive
- name: "setup npm"
uses: actions/setup-node@v4
with:
node-version: '20.12.2'
cache: 'npm'
cache-dependency-path: 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: antora-ui-khronos
run: npm install
- name: "run npm install for docs-site"
working-directory: docs-site
run: npm install
- name: "run npm install for Vulkan-Docs"
working-directory: Vulkan-Docs
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: antora-ui-khronos
run: |
npx update-browserslist-db@latest
./node_modules/gulp/bin/gulp.js --version
./node_modules/gulp/bin/gulp.js bundle
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: ui-bundle.zip
path: antora-ui-khronos/build/ui-bundle.zip
retention-days: 5
- name: "copy ui-bundle.zip to vulkan-site"
run: cp antora-ui-khronos/build/ui-bundle.zip docs-site/
- name: "prepare tutorials"
working-directory: Vulkan-Tutorial/antora
run: |
make setup_tutorial
- name: "prepare repos with make"
run: make prep-sources
- name: "prepare samples"
working-directory: Vulkan-Samples
run: cmake -H"." -B"build/unix" -DVKB_GENERATE_ANTORA_SITE=ON
- name: "build (npx) with stacktrace"
working-directory: docs-site
run: |
npx antora antora-playbook.yml --stacktrace
touch build/site/.nojekyll
- name: 'Upload site artifact'
uses: actions/upload-artifact@v4
with:
name: fullSite
path: docs-site/build
retention-days: 5
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs-site/build/site