forked from KhronosGroup/SYCL_Reference
-
Notifications
You must be signed in to change notification settings - Fork 7
51 lines (49 loc) · 1.47 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
# Copyright 2020 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
on: [push, pull_request]
jobs:
ci:
runs-on: ubuntu-latest
container: rscohn2/oneapi-spec:latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install prerequisites
run: |
apt-get update -qq
DEBIAN_FRONTEND=noninteractive xargs -a packages.txt apt-get install -qq
python3 -m venv venv
. venv/bin/activate
pip install --upgrade --quiet -r requirements.txt
- name: Build doc
run: |
. venv/bin/activate
python doc.py html
python doc.py latexpdf
python doc.py spelling
# ignore non-zero error code
reuse lint > build/reuse.txt || true
- name: Archive build directory
uses: actions/upload-artifact@v1
with:
name: build
path: build
- name: Checkout gh-pages
if: ${{ github.ref == 'refs/heads/dpcpp' }}
uses: actions/checkout@v2
with:
ref: gh-pages
path: gh-pages
- name: Publish to github pages
if: ${{ github.ref == 'refs/heads/dpcpp' }}
run: |
cd gh-pages
rm -rf *
touch .nojekyll
cp -r ../build/html/* .
cp ../build/latex/*.pdf .
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Update from github actions"
git push