Super commit #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2019-2020 Intel Corporation | |
# | |
# SPDX-License-Identifier: MIT | |
on: [push, pull_request] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- name: Install prerequisites | |
run: | | |
sudo apt-get update -qq | |
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: | | |
ONEAPI_DRAFT=true 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 [email protected] | |
git add . | |
git commit --reset-author --amend -m "Update from github actions" | |
git push --force origin gh-pages |