forked from uxlfoundation/oneAPI-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.33 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
# SPDX-FileCopyrightText: 2019-2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
on: [push, pull_request]
jobs:
ci:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install prerequisites
run: |
xargs -a ubuntu-packages.txt sudo apt install -qq
python -m pip install --quiet --upgrade pip
pip install --quiet -r requirements.txt
- name: Builds and checks
run: |
pre-commit run --all
mkdir -p build/reuse
# ignore fail for reuse
reuse lint > build/reuse/lint.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/main' }}
uses: actions/checkout@v2
with:
ref: gh-pages
path: gh-pages
- name: Publish to github pages
if: ${{ github.ref == 'refs/heads/main' }}
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