forked from uxlfoundation/oneAPI-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 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
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 ubuntu-packages.txt apt-get install -qq
python3 -m venv venv
. venv/bin/activate
pip install --upgrade --quiet pip wheel
pip install --upgrade --quiet -r requirements.txt
- name: Build doc
run: |
. venv/bin/activate
python scripts/oneapi.py html
python scripts/oneapi.py latexpdf
python scripts/oneapi.py spelling
- name: Archive build directory
uses: actions/upload-artifact@v1
with:
name: build
path: build
- name: Publish to pre-production
if: ${{ github.ref == 'refs/heads/publish'}}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
run: |
. venv/bin/activate
python scripts/oneapi.py pre-publish
- name: Publish main
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'oneapi-src/oneAPI-spec'}}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
run: |
. venv/bin/activate
python scripts/oneapi.py ci-publish